NO

Author Topic: whats the problem with this code ? + (does pelles knows C++ ?)  (Read 3434 times)

whatsup

  • Guest
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.

Code: [Select]
#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.

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: whats the problem with this code ? + (does pelles knows C++ ?)
« Reply #1 on: July 05, 2010, 12:44:28 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

whatsup

  • Guest
Re: whats the problem with this code ? + (does pelles knows C++ ?)
« Reply #2 on: July 06, 2010, 06:09:57 AM »
ok, thanks.

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: whats the problem with this code ? + (does pelles knows C++ ?)
« Reply #3 on: July 06, 2010, 08:18:37 AM »
For your first question, can you attach the complete project?
---
Stefan

Proud member of the UltraDefrag Development Team

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: whats the problem with this code ? + (does pelles knows C++ ?)
« Reply #4 on: July 06, 2010, 09:29:06 AM »
1. Perhaps change
Code: [Select]
struct AEffect;to forward declaration
Code: [Select]
typedef struct AEffect AEffect;
May the source be with you

whatsup

  • Guest
Re: whats the problem with this code ? + (does pelles knows C++ ?)
« Reply #5 on: July 06, 2010, 03:28:04 PM »
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)