Syntax errors en masse


#1

Hi everybody,

I have this rather big project, that compiles both release and debug on mac. On PC though, I can only compile a debug version. When I try to build a release version, hell arises (see transcript below - I’ve only included a minute part of the errors). I’ve narrowed it down and the problem is in i file that includes the Component class - if this is removed, I can compile the release-version nicely as well… Are there any known bugs, that causes my problem? I heard a rumour about long path-names, but…

-Thanks in advance :slight_smile:

SetupInputDigital.cpp
JUCE! Linking to: jucelib_static.lib
SampleSlipObserver.cpp
…/…/…/…/…/…/SDK\juce\Graphics\colour\ColourServer.h(125) : error C2146: syntax error : missing ‘;’ before identifier ‘Colour’
…/…/…/…/…/…/SDK\juce\Graphics\colour\ColourServer.h(125) : error C2501: ‘TCColours::StringColour::operator`.?BH’’ : missing storage-class or type specifiers
…/…/…/…/…/…/SDK\juce\Graphics\colour\ColourServer.h(125) : error C2586: incorrect user-defined conversion syntax : illegal indirections
[…]


#2

Are you including any headers from other libraries? Could be that something else is defining “Component” or “Colour” or something? Bit strange that the release version’s different though. Check that you’ve not messed up some release-specific build settings.


#3

Thanks for your fast reply :slight_smile:

I’m perfectly sure that no other headers defines Component or Colour. I can actually include a file, that only includes Component, and the same problem results. It’s odd, becuase it can be done from a heap of other source files with no problems - except this one… And only in the release-build. Right now I’m chasing debug macroes that can cause problems, but I have a gut-feeling that that isn’t it… The problem would have been there before as well, in that case…

Ah well - I just thought that there might be some caveat that I should know about :wink: - Thanks.

-Andreas


#4

You’re not trying to include juce_Component.h directly, are you? The headers are only supposed to be included indirectly through juce.h


#5

No, I don’t include directly. I include indirectly through files used in a similar way across the entire project. A funny thing about your question is, that it actually helped immensly. I tried to include juce.h alongside my other included files (who were supposed to grant this file juce.h) - and all of a sudden I only get my own typos as syntax errors. Sweet, and it might just leave my dependency-tree as lean as before…

Thanks :slight_smile:

-A


#6