[CMake] Undefined reference to __Unwind_Resume when building a universal binary with make on Mac OS X

Pedro d'Aquino budsbd at gmail.com
Fri Sep 10 07:46:30 EDT 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100910/7d8b3701/attachment.htm>


More information about the CMake mailing list