[CMake] Undefined reference to __Unwind_Resume when building a universal binary with make on Mac OS X
Ryan Pavlik
rpavlik at iastate.edu
Mon Sep 13 13:26:36 EDT 2010
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 <budsbd at gmail.com
> <mailto:budsbd at 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100913/02f4c036/attachment.htm>
More information about the CMake
mailing list