Skip to content

Linker error with onDropdownEvent - missing required architecture arm64 #160

@tjex

Description

@tjex

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions