my project now compiles with no errors but after attempting linking spews out tons of Apple Xcode Macho linker errors.
It must be something really simple but my ageing brain hurts.
this is in the latest Juce 2 release.
it seems to output all the JUCE .o files and the Main but not my own .cpp stuff ?
I’ve enclosed three screenshots of my project to give you gurus an idea of my project.
it must be some project setting I’m missing.
add Accelerate framework ?
well spotted ( and now added ) thanks but no.
Still same nr. of errors.
For some reason it compiles my cpp body files but can’t produce objects for them
Have you got your namespaces correct? E.g. cpp files that don’t wrap their contents in the correct namespace.
RBClasses.cpp has no object file. You sure its in the target?
Well since they were compiled OK and initially added ( dragged ) into the project I assumed yes.
But on reading this, i took a look at the build phases tab and noticed that my cpp files weren’t in the “compile sources” list and added them with the plus button.
i now get far less errors ( i think there might be just a few CPP method implementations missing )
But i didn’t realise I had to do this extra step. Shouldn’t the fact i can compile and see my cpp files in the left hand side automatically include them in the project for linking ?
Is this some new Xcode 4 “feature” ?
thanks for the help BTW
Version 4 has too many “features” for me…i’m sticking with 3.2.5 as long as I can!
(could it be doing some static analysis of the files separately from compiling them into your code?)
Are you using the introjucer? It has an option to add files to the project without compiling them, which you might have managed to enable by mistake?
Possibly but don’t think so, to my recollection I used introducer initially but then added my own cpp files afterwards directly into the Xcode project.
I did this recently since on JUCE 2.0 decided to create a new just project from scratch using introducer and then add my stuff.
the latest changes following from justing seem to have mad a big difference so i’ll crack on. I think the LINKER can touch the cpp files now.
When you drag sources into Xcode you need to make sure “add to target” is selected. This is the same for Xcode 3.2 but I think it defaults to on rather than off. This can be useful if you have multiple targets and have different sources for each of them.
I see. problem seems to be solved now.
Thanks to all for the help.