Struggling with xCode

Hi,

finally I have received my new Macbook Pro to get my juce project working on Mac
I’ve updated to latest OSX and xCode.
I could compile juce demo plugin and plugin host so far but no luck with my own project .-(
It compiles okay (except having a few warnings) but then I get massive link errors
and I think because of the huge ammount of link errors, I did something essential wrong.
As I am totally new to Mac and xCode, I would really appreciate to receive any hints from
the experts. The following lines are just a small part of the build results. You might see
imediatelly what I do wrong or what I’have missed to do…

[list]
Build VCommanderVST of project VCommanderVST with configuration Debug

Ld build/Debug/VCommanderVST.component/Contents/MacOS/VCommanderVST normal i386
cd “/Eigene_Dateien/VST_Development/Eigene Projekte/VCommanderVST/VC_Editor/build/MacOSX”
/Developer/usr/bin/g+±4.2 -arch i386 -bundle “-L/Eigene_Dateien/VST_Development/Eigene Projekte/VCommanderVST/VC_Editor/build/MacOSX/build/Debug” “-F/Eigene_Dateien/VST_Development/Eigene Projekte/VCommanderVST/VC_Editor/build/MacOSX/build/Debug” -filelist “/Eigene_Dateien/VST_Development/Eigene Projekte/VCommanderVST/VC_Editor/build/MacOSX/build/VCommanderVST.build/Debug/VCommanderVST.build/Objects-normal/i386/VCommanderVST.LinkFileList” -bundle -framework Cocoa -framework Carbon -framework IOKit -framework CoreAudio -framework CoreMIDI -framework WebKit -framework DiscRecording -framework OpenGL -framework QuartzCore -framework QTKit -framework QuickTime -framework AudioUnit -framework CoreAudioKit -framework AudioToolbox -o “/Eigene_Dateien/VST_Development/Eigene Projekte/VCommanderVST/VC_Editor/build/MacOSX/build/Debug/VCommanderVST.component/Contents/MacOS/VCommanderVST”

Undefined symbols:
“juce::DirectoryContentsList::setDirectory(juce::File const&, bool, bool)”, referenced from:
JK_FileManager::setRoot(juce::File const&) in JK_FileManager.o
JK_FileManager::changeListenerCallback(juce::ChangeBroadcaster*) in JK_FileManager.o
JK_FileManager::setDirectoryList() in JK_FileManager.o
JK_FileManager::setDirectoryList() in JK_FileManager.o
"juce::ListBox::mouseMove(juce::MouseEvent const&)", referenced from:
vtable for JK_ListBoxin JK_MethodsAndClasses.o
vtable for JK_FileListComponentin JK_FileManager.o
"juce::Font::getAscent() const", referenced from:
VCLookAndFeel::drawPopupMenuItem(juce::Graphics&, int, int, bool, bool, bool, bool, bool, juce::String const&, juce::String const&, juce::Image*, juce::Colour const*)in VCLookAndFeel.o
"juce::AffineTransform::rotation(float)", referenced from:
VCLookAndFeel::drawLinearSliderThumb(juce::Graphics&, int, int, int, int, float, float, float, juce::Slider::SliderStyle, juce::Slider&)in VCLookAndFeel.o
"juce::Button::handleCommandMessage(int)", referenced from:
vtable for JK_Buttonin JK_MethodsAndClasses.o
"non-virtual thunk to juce::TextEditor::getTextInRange(juce::Range const&) const", referenced from:
vtable for JK_TextEditorin JK_MethodsAndClasses.o
"juce::TextEditor::returnPressed()", referenced from:
vtable for JK_TextEditorin JK_MethodsAndClasses.o
"juce::DocumentWindow::minimiseButtonPressed()", referenced from:
vtable for JK_StandaloneFilterWindowin JK_StandaloneFilterWindow.o
"juce::DocumentWindow::setTitleBarButtonsRequired(int, bool)", referenced from:
JK_StandaloneFilterWindow::JK_StandaloneFilterWindow(juce::String const&, juce::Colour const&)in JK_StandaloneFilterWindow.o
JK_StandaloneFilterWindow::JK_StandaloneFilterWindow(juce::String const&, juce::Colour const&)in JK_StandaloneFilterWindow.o
"juce::String::toUpperCase() const", referenced from:
JK_MidiDevices::translateMidiMessage(juce::String const&, juce::MidiMessage const&)in JK_MidiDevices.o
"juce::Slider::valueChanged()", referenced from:
vtable for JK_Sliderin JK_MethodsAndClasses.o
"juce::Time::~Time()", referenced from:
juce::DirectoryContentsList::FileInfo::~FileInfo()in JK_FileManager.o
juce::DirectoryContentsList::FileInfo::~FileInfo()in JK_FileManager.o
"juce::MidiMessage::isAftertouch() const", referenced from:
JK_MidiDevices::translateMidiMessage(juce::String const&, juce::MidiMessage const&)in JK_MidiDevices.o
JK_MidiDevices::processMidiInputMessages(juce::MidiMessage const&) in JK_MidiDevices.o
JK_MidiDevices::run() in JK_MidiDevices.o
JK_MidiDevices::run() in JK_MidiDevices.o
JK_MidiDevices::run() in JK_MidiDevices.o
"juce::Justification::Justification(juce::Justification const&)", referenced from:
juce::label::getJustificationType() constin VCLookAndFeel.o
"juce::TextEditor::setInputRestrictions(int, juce::String const&)", referenced from:
JK_UniWindow::setStyle(int) in JK_UniWindow.o
JK_UniWindow::setStyle(int) in JK_UniWindow.o
JK_UniWindow::setStyle(int) in JK_UniWindow.o
"juce::XmlElement::getIntAttribute(juce::String const&, int) const", referenced from:
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
JK_Filter::setStateInformation(void const*, int)in JK_Filter.o
"juce::ComboBox::setJustificationType(juce::Justification const&)", referenced from:
JK_Settings::JK_Settings(JK_Filter*, JK_MidiDevices*, JK_ApplicationManager*)in JK_Settings.o
JK_Settings::JK_Settings(JK_Filter*, JK_MidiDevices*, JK_ApplicationManager*)in JK_Settings.o
JK_Settings::JK_Settings(JK_Filter*, JK_MidiDevices*, JK_ApplicationManager*)in JK_Settings.o
JK_Settings::JK_Settings(JK_Filter*, JK_MidiDevices*, JK_ApplicationManager*)in JK_Settings.o
JK_Settings::JK_Settings(JK_Filter*, JK_MidiDevices*, JK_ApplicationManager*)in JK_Settings.o
JK_Settings::JK_Settings(JK_Filter*, JK_MidiDevices*, JK_ApplicationManager*)in JK_Settings.o
"juce::ComponentListener::componentVisibilityChanged(juce::Component&)", referenced from:
vtable for JuceAUin juce_AU_Wrapper.o
"juce::MidiKeyboardComponent::mouseDrag(juce::MouseEvent const&)", referenced from:
vtable for JK_MidiKeyboardin JK_MidiKeyboard.o
"typeinfo for juce::ListBoxModel", referenced from:
typeinfo for JK_ProgramManagerin JK_MethodsAndClasses.o

[/list]

I assume that it might be a missing line somewhere in the project settings ???
The project compiles w/o any warning/errors on Windows and works perfect in
Cubase, Ableton, Samplitude etc…

Thank you for your help!

Joerg

stupid question, did you add all *.cpp files to your project?

are you using the amalgated files, or are you the precompiled libary?

Yes, all files are added and I am using the amalgated files.

Can you verify that the files are actually compiled, as well? When you add files to a project in Xode, you have to select which target to which to add them. (In the case you have several targets.)

My advice is to use the new jucer to create your project - XCode is a bit of a complicated nightmare when you’re not familiar with it.

Thanks Guys for your help!

I finally could manage to get it working using the juce demo plugin
project as template.
I am more than happy to see my project running on MAC!
Thank you Jules for your work with juce to make that happen!

Now I will look at the new jucer…

Thanks again,
Joerg

Hi again,

I now using Jucer to set up my Xcode project and it does compile fine but
I have the feeling that the plugin is much slower than the Windows version
although both versions have been compiled from the same project. Even the size
of the plugin is much bigger than the Windows version. Could it be that the Release version still contains
debug information and if yes, what can I do to avoid that?
The flag “Generate Debug Symbols” is off in Release!

What else do I need to check?

Thanks…

Hi All,

It’s a sunny day here in Berlin and I am in a very good mood because I found
the culprit of the performance lack in my project after porting it to MAC.
It wasn’t a wrong compiler setting, it was related to the use of setTiledImageFill
in my listbox paint methods to create a inverse font.
It might be a problem in the setTiledImageFill method or a well known fact to not use it
for such purposes (that I didn’t know) but since I use Path::setUsingNonZeroWinding(false)
instead, it works like a charm on both, Windows and MAC.

Thought I should share that experience with you guys…

Joerg

Thanks! So you’re saying that just by changing setUsingNonZeroWinding (true) to setUsingNonZeroWinding (false), it makes a difference to the performance? If so, I guess that must be some kind of weirdness deep inside the OS’s CoreGraphics implementation.

No, I changed completely from setTiledImageFill method to the other way of creating inverse fonts
you’ve suggested in that post:

http://www.rawmaterialsoftware.com/viewtopic.php?f=2&t=5485&hilit=Joerg#p29917

Cheers,
Joerg

Ah, I see. Actually, I do remember that for some reason the CoreGraphics tiled image fill routine was incredibly slow under certain circumstances.