if(APPLE)
    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
endif()

Hope this helps!

Ryan

On 9/10/10 9:19 AM, Pedro d'Aquino wrote:
The problem wasn't related to the universal binaries, but to the SDK used (10.5). I need to add "-mmacosx-version-min=10.5" to the compiler flags in order to make it work.

Shouldn't this be handled automatically by CMake?

On Fri, Sep 10, 2010 at 8:46 AM, Pedro d'Aquino <bud...@gmail.com <mailto:bud...@gmail.com>> wrote:

    Hi everyone,

    I'm currently modifying an existing CMake-based project to build
    universal binaries on 10.6.4. Xcode 3.2.3 builds the new project
    fine, but the make-based compilation fails because of an undefined
    symbol, __Unwind_Resume.

    The actual command used for compiling each C++ file is (from
    VERBOSE=1):
    /usr/bin/c++    -Wall -Wno-multichar -O2 -g -Wall -Wno-multichar
    -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk ....

    After all files are compiled successfully, linking fails with the
    following message:

    Undefined symbols:
      "__Unwind_Resume", referenced from:
          macosx::MacLibraryLoader::release(ILibraryInterface**)in
    mac_library_loader.cpp.o
          macosx::MacLibraryLoader::getInterface()    in
    mac_library_loader.cpp.o
macosx::MacLibraryLoader::MacLibraryLoader(std::basic_string<char, std::char_traits<char>,
    std::allocator<char> > const&)in mac_library_loader.cpp.o
          .....

    It seems __Unwind_Resume is referenced in just about every .cpp
    file I compile.

    The only change I've made from my original, i386-only project was add

    if(APPLE)
    SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64")
    set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
    endif()

    Does anyone know what is going on?

    Thanks a lot,

    Pedro d'Aquino






_______________________________________________
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


--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University

http://academic.cleardefinition.com/

_______________________________________________
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