Important: Please read the Qt Code of Conduct -

Symbol(s) not found

  • Hey, I am attempting to build an open source project with QT Creator on mac, however I continue getting Symbol(s) not found errors. The next error that comes up is "collect2: ld returned 1 exit status"

    Here is the beginning and last part of the output.
    @22:19:5prjt7: Running steps for project prjtProject...
    22:19:57: Configuration unchanged, skipping qmake step.
    22:19:57: Starting: "/usr/bin/make" -w
    make: Entering directory `/Users/nomor/prjtProject-build-desktop-Qt_4_8_3__Qt__Debug'
    g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o strings.o preferences.o os_windows.o metadatataglib.o main.o libprjtsingleton.o guiprefs.o guimenuhandler.o guidetail.o guibatch.o guiabout.o externalplaylistserato.o externalplaylist.o downsamplerlibsrc.o downsamplerib.o downsampler.o decoderlibav.o decoder.o asyncmetadatareadprocess.o asynckeyprocess.o asyncfileobject.o moc_strings.o moc_guiprefs.o moc_guimenuhandler.o moc_guidetail.o moc_guibatch.o moc_guiabout.o qrc_resources.o -F/Library/Frameworks -L/Library/Frameworks -framework QtXmlPatterns -framework QtNetwork -framework QtCore -framework QtXml -framework QtGui @


    @std::pair<TagLib::String const, TagLib::ListTagLib::ASF::Attribute >::pair(TagLib::String const&, TagLib::ListTagLib::ASF::Attribute const&)in metadatataglib.o
    std::pair<TagLib::String const, TagLib::MP4::Item>::pair(std::pair<TagLib::String const, TagLib::MP4::Item> const&)in metadatataglib.o
    std::pair<TagLib::String const, TagLib::MP4::Item>::pair(TagLib::String const&, TagLib::MP4::Item const&)in metadatataglib.o
    std::pair<TagLib::String const, TagLib::APE::Item>::pair(TagLib::String const&, TagLib::APE::Item const&)in metadatataglib.o
    std::pair<TagLib::String const, TagLib::APE::Item>::pair(std::pair<TagLib::String const, TagLib::APE::Item> const&)in metadatataglib.o
    std::pair<TagLib::String const, TagLib::APE::Item>::~pair()in metadatataglib.o
    std::pair<TagLib::String const, TagLib::APE::Item>::~pair()in metadatataglib.o
    std::pair<TagLib::String const, TagLib::StringList>::pair(TagLib::String const&, TagLib::StringList const&)in metadatataglib.o
    std::pair<TagLib::String const, TagLib::StringList>::pair(std::pair<TagLib::String const, TagLib::StringList> const&)in metadatataglib.o
    "TagLib::FLAC::File::File(char const*, bool, TagLib::AudioProperties::ReadStyle)", referenced from:
    TagLibMetadata::TagLibMetadata(QString const&)in metadatataglib.o
    TagLibMetadata::TagLibMetadata(QString const&)in metadatataglib.o
    "typeinfo for TagLib::ID3v2::CommentsFrame", referenced from:
    TagLibMetadata::setComment(QString const&) in metadatataglib.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: *** [] Error 1
    22:19:58: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project prjtProject (target: Desktop)
    When executing step 'Make'@

    Any idea what could be wrong? Thanks!

  • Moderators

    Clearly, stdlib is missing. Add it to LIBS variable in qmake, preferably at the beginning, as ld is an incremental linker. This is very likely to be a problem of newest Xcode version (you are using Xcode > 4.0, right?), Qt is not working with it very well. You can try using macx-llvm makespec, and forcing Mac SDK path.

  • I just installed XCode 3.2.2 to combat this issue. What's the default location of the stdlib library? I can't seem to find any .lib to add.


Log in to reply