whats the problem with this code ? + (does pelles knows C++ ?)

Started by whatsup, July 05, 2010, 12:22:57 PM

Previous topic - Next topic

whatsup

hey every body
1. i took this code from a header file,
and i get a syntex error on pellesc,
can someone tell me whats the problem and how to fix it.


#define WIN32
#define VSTCALLBACK __cdecl
typedef int VstInt32; ///< 32 bit integer type
typedef VstInt32 VstIntPtr;

struct AEffect;

typedef VstIntPtr (VSTCALLBACK *audioMasterCallback) (AEffect* effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt);



2. i have a cpp app, does pelles knows to compile cpp files ?

thanks in advanced.

Stefan Pendl

Quote from: whatsup on July 05, 2010, 12:22:57 PM
2. i have a cpp app, does pelles knows to compile cpp files ?

Pelles C is ANSI C only, for C++ you need to use a different compiler.
---
Stefan

Proud member of the UltraDefrag Development Team


Stefan Pendl

For your first question, can you attach the complete project?
---
Stefan

Proud member of the UltraDefrag Development Team

TimoVJL

1. Perhaps change
struct AEffect;
to forward declaration
typedef struct AEffect AEffect;
May the source be with you

whatsup

thank you tim, that was it.

the project is C++, and now i understand that pellesc doesn't know this language,
so i gaveup from it for c++.

(maybe in the future i will be able to convert it to C)