You are not specifying the libraries that contain those symbols. Looking at your link line you are missing at least the Qt libraries/ Frameworks and maybe some others.

If the arch were incorrect the linker would explicitly tell you that the libraries you are trying to link against is the wrong arch. Since I don't see that error I am assuming that you have forgotten to list the libraries that contain those symbols in a "target_link_libraries()" command.


_________________________________________________________
Mike Jackson                  [email protected]
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio

On Sep 11, 2009, at 10:24 AM, Boudewijn Rempt wrote:

Hi,

I'm getting weird linking errors after I upgraded to Snow Leopard. I'm using the CVS version of cmake. If I have the MACOSX_BUNDLE flag in ADD_EXECUTABLE,
there are lots of weird visiblity errors like:
nking CXX executable HyvesDesktop.app/Contents/MacOS/HyvesDesktop
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/ HyvesDesktop.dir/link.txt --verbose=1 /usr/bin/c++ -mmacosx-version-min=10.6 -Wall -arch i386 -fPIC - fvisibility=hidden -fvisibility-inlines-hidden -Wl,- search_paths_first -headerpad_max_install_names -fPIC CMakeFiles/ HyvesDesktop.dir/HyvesDesktop_automoc.cpp.o CMakeFiles/ HyvesDesktop.dir/src/main.cpp.o CMakeFiles/HyvesDesktop.dir/ qrc_HyvesDesktop.cxx.o -o HyvesDesktop.app/Contents/MacOS/ HyvesDesktop
Undefined symbols:
 "CrashHandler::CrashHandler::~CrashHandler()", referenced from:
     _main in main.cpp.o
     _main in main.cpp.o
 "QString::free(QString::Data*)", referenced from:
     QString::~QString()in main.cpp.o
 "Updater::Updater::instance()", referenced from:
     _main in main.cpp.o
 "Player::Player::playSound(QString const&)", referenced from:
     _main in main.cpp.o
 "QTextStream::operator<<(QString const&)", referenced from:
     _main in main.cpp.o
     _main in main.cpp.o
     _main in main.cpp.o
 "Updater::Updater::installAvailableUpdate()", referenced from:
     _main in main.cpp.o
"QTextStream::QTextStream(__sFILE*, QFlags<QIODevice::OpenModeFlag>)", referenced from:
     __static_initialization_and_destruction_0(int, int)in main.cpp.o
 "QFileInfo::path() const", referenced from:
     setupLibraryPaths(char**) in main.cpp.o
 "endl(QTextStream&)", referenced from:
     __Z4endlR11QTextStream$non_lazy_ptr in main.cpp.o
 "QListData::append()", referenced from:
     QList<QString>::append(QString const&)in main.cpp.o
 "Player::Player::instance()", referenced from:
     _main in main.cpp.o
"QCoreApplication::setLibraryPaths(QStringList const&)", referenced from:
     setupLibraryPaths(char**) in main.cpp.o
 "Version::Version(QString const&)", referenced from:
     __static_initialization_and_destruction_0(int, int)in main.cpp.o
 "CrashHandler::CrashHandler::CrashHandler()", referenced from:
     _main in main.cpp.o
 "qt_assert(char const*, char const*, int)", referenced from:
     QString::QString(QString const&)in main.cpp.o
"QtPrivate::QStringList_contains(QStringList const*, QString const&, Qt::CaseSensitivity)", referenced from: QStringList::contains(QString const&, Qt::CaseSensitivity) constin main.cpp.o
 "qFree(void*)", referenced from:
     QList<QString>::free(QListData::Data*)       in main.cpp.o
     QList<QString>::detach_helper()       in main.cpp.o
 "QTextStream::operator<<(char const*)", referenced from:
     _main in main.cpp.o
     _main in main.cpp.o
 "QListData::shared_null", referenced from:
     __ZN9QListData11shared_nullE$non_lazy_ptr in main.cpp.o
 "QTextStream::~QTextStream()", referenced from:
     ___tcf_8 in main.cpp.o
"QDesktopServices ::storageLocation(QDesktopServices::StandardLocation)", referenced from:
     _main in main.cpp.o
 "QString::operator=(QString const&)", referenced from:
     _main in main.cpp.o
"qUnregisterResourceData(int, unsigned char const*, unsigned char const*, unsigned char const*)", referenced from:
     qCleanupResources_HyvesDesktop()     in qrc_HyvesDesktop.cxx.o
 "QFileInfo::~QFileInfo()", referenced from:
     setupLibraryPaths(char**) in main.cpp.o
     setupLibraryPaths(char**) in main.cpp.o
 "QListData::detach3()", referenced from:
     QList<QString>::detach_helper()       in main.cpp.o
 "QString::fromAscii_helper(char const*, int)", referenced from:
     QString::QString(char const*)in main.cpp.o
 "Version::toString() const", referenced from:
     _main in main.cpp.o
     _main in main.cpp.o
 "QApplication::exec()", referenced from:
     _main in main.cpp.o
 "QCoreApplication::arguments()", referenced from:
     _main in main.cpp.o
 "QString::fromAscii(char const*, int)", referenced from:
     operator+(char const*, QString const&)in main.cpp.o
     QString::operator+=(char const*)in main.cpp.o
     operator+(QString const&, char const*)in main.cpp.o
"HyvesDesktopApplication::HyvesDesktopApplication(int&, char**, QString const&)", referenced from:
     _main in main.cpp.o
 "QFileInfo::QFileInfo(QString const&)", referenced from:
     setupLibraryPaths(char**) in main.cpp.o
"qRegisterResourceData(int, unsigned char const*, unsigned char const*, unsigned char const*)", referenced from:
     qInitResources_HyvesDesktop()     in qrc_HyvesDesktop.cxx.o
 "QString::append(QString const&)", referenced from:
     QString::operator+=(QString const&)in main.cpp.o
     QString::operator+=(char const*)in main.cpp.o
"QString::replace(QString const&, QString const&, Qt::CaseSensitivity)", referenced from:
     _main in main.cpp.o
     _main in main.cpp.o
     _main in main.cpp.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Does anyone have any hint for me?

Boudewijn

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to