Compiler error on Linux


#1

Hi,

The Introjucer doesn't compile on Linux (specifically on Ubuntu 10.4) at the moment. GCC version is "gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3". (OK, that's an old version, but the problem on Linux is, you can't compile a binary which will work on older distributions than the one on your build machine because of the dependency on the C runtime version on your build machine.)

Compiling jucer_ProjectContentComponent.cpp
In file included from ../../Source/Project/jucer_ProjectContentComponent.cpp:130:
../../Source/Project/jucer_ConfigTree_Modules.h: In member function ‘virtual void ConfigTreePanel::EnabledModulesItem::filesDropped(const juce::StringArray&, int)’:
../../Source/Project/jucer_ConfigTree_Modules.h:313: error: parameter may not have variably modified type ‘juce::File [(((long unsigned int)(((long int)i) + -0x00000000000000001)) + 1)]

That line says:

ModuleDescription m (File (files[i]).getChildFile (ModuleDescription::getManifestFileName()));

I have no idea why that's wrong or what the error message actually means. But it will compile after you change it to

File f(files[i]);
ModuleDescription m (f.getChildFile (ModuleDescription::getManifestFileName()));

--
Roeland


#2

You can have a newer gcc on 10.04 if you compile one, which is what I do for my builds.

See https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain

 


#3

Thanks - I've made a quick change to the code that should avoid that issue.


#4

OK, it builds now, thanks

--
Roeland