Author Topic: Compile Errors  (Read 4802 times)

Offline hudsonm4000

  • Single posting newcomer
  • *
  • Posts: 3
Compile Errors
« on: December 15, 2011, 02:31:37 pm »
Hi, I'm new to this forum ... and having a problem with compiling on Linux (Ubuntu 11:10)

I am also new to using Linux (so this may well be my problem!!) but I have been successfully using CodeBlocks on Win7 for a couple of months now for some simple VST plugin development.

I am trying to get to get the again VST plugin demo from the Steinberg SDK to compile using CodeBlocks. I have successfully done this on a Windows PC, but on Linux it isn't working. I have done everything the same (except directories and linker paths are different of course), but I am getting errors

For example, the aeffect.h header file contains this line of code:

Quote
126.  typedef VstIntPtr (VSTCALLBACK *AEffectDispatcherProc) (AEffect* effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt);

which is generating this error:

Quote
/home/mark/SoftDev/SDK/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h|126|error: expected ‘)’ before ‘*’ token|

Why is the compiler expecting  ‘)’ before ‘*’ ??  It's fine on Win7  and I am using GNU GCC as the compiler for both platforms.

None of the code is mine, it's all just the SDK demo code that I am using as a means of testing a setup for working on Linux. But as it worked on Win7 I need some guidance on what I am missing & what is going wrong here.

Many thanks
Mark

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Compile Errors
« Reply #1 on: December 15, 2011, 04:05:49 pm »
Please read the rules and post your problem in the appropriate place!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Radek

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: Compile Errors
« Reply #2 on: December 15, 2011, 04:14:08 pm »
I have no experience with VST but I would try

Code
typedef VstInPtr VSTCALLBACK (*AEffectDispatcherProc)( AEffect *effect, ... );

or

Code
typedef VstInPtr (VSTCALLBACK (*AEffectDispatcherProc))( AEffect *effect, ... );

Sometimes, you need to be very explicit in specifying where the star belongs to.

Offline hudsonm4000

  • Single posting newcomer
  • *
  • Posts: 3
Re: Compile Errors
« Reply #3 on: December 15, 2011, 07:07:43 pm »
Please read the rules and post your problem in the appropriate place!

I have a problem when building using the linux version of Code::Blocks that isn't happening with the Windows version, using exactly the same source files & compiler, so I thought someone here might be able to advise why this might be happening. I didn't know I was breaking any rules, so sorry if I have.

Offline hudsonm4000

  • Single posting newcomer
  • *
  • Posts: 3
Re: Compile Errors
« Reply #4 on: December 15, 2011, 07:10:08 pm »
I have no experience with VST but I would try

Code
typedef VstInPtr VSTCALLBACK (*AEffectDispatcherProc)( AEffect *effect, ... );

or

Code
typedef VstInPtr (VSTCALLBACK (*AEffectDispatcherProc))( AEffect *effect, ... );

Sometimes, you need to be very explicit in specifying where the star belongs to.

Thank you Radek. I will give these a try  :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Compile Errors
« Reply #5 on: December 15, 2011, 07:26:15 pm »
from http://forums.codeblocks.org/index.php/topic,8962.0.html
Quote
2. Compiler errors are NOT Code::Blocks errors. Usually, C++ newcomers tend to confuse the Editor/IDE (Code::Blocks) with the Compiler (MINGW / GCC). You may see some errors in the compiler output because you missed to do something right in your code. But that's not Code::Blocks troubleshooting, that's C++ troubleshooting and does not belong in here. If your program doesn't compile, READ THE C++ MANUAL.

http://wiki.codeblocks.org/index.php?title=FAQ-General#Q:_What_Code::Blocks_is_not.3F
Quote
Code::Blocks is not a compiler, nor a linker. Release packages of Code::Blocks may include a compiler suite (MinGW/GCC), if not provided by the target platform already. However, this is provided "as-is" and not developed/maintained by the Code::Blocks development team.

Turning on Full Compiler Logging will help you to determine compiler problems causes
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Tim S.
« Last Edit: December 15, 2011, 07:30:05 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org