Building demo VST gcc/codeblocks


#1

I’ll start by saying I know it’s easier to build with MS Visual Express but I really want to stick with gcc as I want my project to build with one compiler on all systems. I just find it easier to maintain project this way. Anyway, to my problem, I can’t build the VST demo with codeblocks/gcc. Everything else is ok, the library, demo and a few simple applications of my own built without problem but the VST demo won’t. I’ve built plugins with gcc before without any problems but I can’t even get past the compile stage here. One thing I did was change the following:

extern “C” __declspec (dllexport) void* main (audioMasterCallback audioMaster)
{
return (void*) pluginEntryPoint (audioMaster);
}

because gcc didn’t like return void* from main. That led to me a load of errors about booleans:

D:\MyDocuments\SourceCode\juce\juce_amalgamated.cpp|179998|error: `boolean’ does not name a type|

I’m reluctant to change anything in the juce_amalgamated.cpp file. Has anyone experienced this problem. Is there a preprocessor flag to get past this boolean issue?


#2

I added the preprocessor directive JUCE_ONLY_BUILD_CORE_LIBRARY and this gets me past the boolean issue. Now it hangs on:

D:\MyDocuments\SourceCode\juce\juce_amalgamated.cpp:228809: error: declaration of bool juce::juce_setFileReadOnly(const juce::String&, bool)' throws different exceptions D:\MyDocuments\SourceCode\juce\juce_amalgamated.cpp:4544: error: than previous declarationbool juce::juce_setFileReadOnly(const juce::String&, bool) throw ()’

Any ideas as to what I need to do next?


#3

Try putting a throw () after the juce_setFileReadOnly() declaration at line 228809.

I think Jules has been updating the File stuff recently though, are you on the tip?


#4

On the tip? Not sure what that means? Thanks for the advise about throw, I’ll try it out. Are you building with mingw?

Rory.


#5

tip = the current development version.

i.e., “checking out” the source code from sourceforge using Subversion (SVN), are you using the 1.46 release?

…no I’m not using mingw, so if you get some weird mingw-specific problems I won’t know what’s going on!


#6

Ah, I didn’t realise that there was a svn repos. I’ll try that. Cheers.


#7

I checked out the latest source in the SVN. After some tweaks to get rid of the forcedinline problems I could build the library without any further problems. I then turned my attention to building the demo plugin. Again I had to make some changes to the code in order to avoid the forcedinline issue. Now I’m back to the boolean problems. After replacing ‘Boolean’ with ‘boolean’, or ‘bool’, can’t quite remember, I got through that problem and now I’m onto another one. I give up. I find it very frustrating that there is no support for gcc on windows. I hope the powers that be are getting well looked after by microsoft for their efforts in discouraging people from using open source cross-platform software.


#8

Rory, I can appreciate your frustration in not being able to use the tools you want, but I think you are way off base in insinuating that Jules is somehow keeping people from the open-source/cross-platform world, as that is what JUCE enables… If your assertion were true, then the fact that you are trying to compile on Windows would mean that you are guilty of the same thing. But I don’t believe that, and I suspect you don’t either. M$ provides free versions of some excellent development tools, that allow YOU to compile YOUR open-source/cross-platform code on Windows, and JUCE works perfectly within this environment.


#9

I’m not saying that Jules is keeping people from open-source/cross-platform software and I do appreciate the amount the time and effort that’s been put into JUCE. I just find it ironic when developers of open source projects use closed source build environments. I’m trying to port some linux software I’ve written to windows which is why I’m stuck on that platform at the moment, but you make a good point. On a practical side I just don’t have space on my machine for the 1gb+ needed to house MSVC. The other issue is that I’m using several libraries that are all built with gcc. I know that I can call them with MSVC after converting them but that doesn’t seem like an attractive option. Either way, I’ll figure something out, and apologies again for my imprudent post earlier, I was just after having a bad-compiler day.