ofxDatGui icon indicating copy to clipboard operation
ofxDatGui copied to clipboard

Linker error with onDropdownEvent - missing required architecture arm64

Open tjex opened this issue 3 years ago • 0 comments

On a M1max 14" MBP. Tried with Xcode 13.3 and 13.4.
I've just tried adding a dropdown to my gui and when using the ofxDatGuiDropdownEvent, I get given a linker error:

ld: warning: ignoring file /Applications/Xcode-13.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/QTKit.framework/QTKit.tbd, missing required architecture arm64 in file /Applications/Xcode-13.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/QTKit.framework/QTKit.tbd Undefined symbols for architecture arm64: "ofApp::onDropdownEvent(ofxDatGuiDropdownEvent)", referenced from: ofApp::setup() in ofApp.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've checked the build phases -> compile sources section and it shows that both the main .cpp source files are included for compilation.

Screen Shot 2022-09-13 at 15 06 06

Not sure what's happening because I also have two sliders and a button that work just fine.
If I comment out the event handler call in setup(), then it compiles successfully.

ofApp.cpp

    gui = new ofxDatGui( ofxDatGuiAnchor::TOP_RIGHT);
    ofxDatGuiButton* ballSpawn = gui->addButton("Spawn Ball");
    gui->onButtonEvent(this, &ofApp::onButtonEvent);
    
    ofxDatGuiSlider* sliderRadius = gui->addSlider("Tombola Size", 0, 200);
    gui->onSliderEvent(this, &ofApp::onSliderEvent);
    
    ofxDatGuiSlider* sliderRotate = gui->addSlider("Tombola Rotate", -5, 5);
    gui->onSliderEvent(this, &ofApp::onSliderEvent);
    
    ofxDatGuiDropdown* midiOutPorts = gui->addDropdown("Midi Out Ports", midiOut.getOutPortList());
    gui->onDropdownEvent(this, &ofApp::onDropdownEvent);

ofApp.h

    // ofxDatGui
    ofxDatGui* gui;
    ofxDatGuiButton* ballSpawn;
    ofxDatGuiSlider* sliderRadius;
    ofxDatGuiSlider* sliderRotate;
    ofxDatGuiDropdown* midiOutPorts;
    void onButtonEvent(ofxDatGuiButtonEvent e);
    void onSliderEvent(ofxDatGuiSliderEvent e);
    void onDropdownEvent(ofxDatGuiDropdownEvent e);

📌 Here is the documentation for dropdowns

tjex avatar Sep 13 '22 13:09 tjex