XCode - "has different visibility"

Hi folks,

Am I the only one one getting tons of warnings now when linking code with Juce? Using 10.6 and XCode 3.2, with Juce from git from last week…

I get hundreds of warnings of the form: "ld: warning: juce::jmin(int, int)has different visibility (hidden) in /Users/me/juce/bin/UninstalledProducts/libjucedebug.a(juce_File.o) and (default) in /…

Driving me a little potty. :slight_smile: I know that Jules uses JUCE_API to get around this, but doesn’t seem to be working as I expected. NB: I’m linking with the Juce library, rather than compiling-in the amalgamated sources.

Pete

No, I’m getting that too and find it pretty annoying. Wasn’t really sure what was causing it though so have tried to ignore it for now.

I did have a play around with the visibility settings in the build settings such as “Inline methods hidden”, “Symbols hidden by default” and “Hidden local variables” but could only make it worse going from around 200 errors to 1300.

I’ve been using the amalgamated version all the time so hadn’t noticed those warnings. I guess I should take a look.

Please. :slight_smile:

No news on this? I have tried out quite a few linking and compiling flags, but none seem to remove or even disable the warning…

I was able resolve this by changing the visibility options in both my application target settings and in the JUCE library target settings. I don’t remember the exact setting names, but I just typed “visibility” into the search box on the settings window.

I then had to clean and rebuild both JUCE and my app.

More info here:
http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html

Matt

Just an update on the information matt has shared, unchecking “Inline method hidden” does the job. It can also be searched as “GCC_INLINES_ARE_PRIVATE_EXTERN”.

Thanks - I’ll make sure that’s turned on as default in the project.

It should be turned off in both juce project and the project of the application using juce library.

But that flag was already turned off… I thought you guys were saying that it wasn’t working, so I assumed you meant it needed to be turned on (??)

In the project that I had downloaded(1.50 release) the flag was turned on which led to the problem. May be you have fixed it in the tip.

Possibly, though I don’t remember changing it. I’ll double-check before my next check-in.

I also had to uncheck “Symbols Hidden by Default” in both projects.

Matt

this last “Symbols Hidden By Default” option still has to be changed in the JUCE project from the tip. Jules, could you to that?

Ok, will do.

I’ve just been getting this again, with the tip as of 3-4 days ago.

Had to do the main ‘Juce’ project item and the ‘Juce’ Target (as opposed to Juce (iPhone).

Bruce

Strange. I’ve not changed any settings recently.

Anyway, I’ll shortly be replacing all the old juce library projects with jucer-generated ones, so they’ll definitely all have the correct settings to build cleanly…

I am still getting these warnings even with a fresh compilation of the tip and using the Jucer to generate my projects. I noticed that the Jucer generates projects with these two options ticked by default which means I have to uncheck them manually every time I do a “Save Project and Open in XCode”. Would it be possible to have these unticked by default?

Ok, thanks, I’ll take a look…