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.<div><br></div><div>Shouldn't this be handled automatically by CMake?<br>
<br><div class="gmail_quote">On Fri, Sep 10, 2010 at 8:46 AM, Pedro d'Aquino <span dir="ltr"><<a href="mailto:budsbd@gmail.com">budsbd@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi everyone,<div><br></div><div>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.</div>
<div><br></div><div>The actual command used for compiling each C++ file is (from VERBOSE=1):</div><div>/usr/bin/c++ -Wall -Wno-multichar -O2 -g -Wall -Wno-multichar -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk ....</div>
<div><br></div><div><div><div>After all files are compiled successfully, linking fails with the following message:</div></div></div><div><br></div><div><div>Undefined symbols:</div><div> "__Unwind_Resume", referenced from:</div>
<div> macosx::MacLibraryLoader::release(ILibraryInterface**)in mac_library_loader.cpp.o</div><div><div> macosx::MacLibraryLoader::getInterface() in mac_library_loader.cpp.o</div><div> macosx::MacLibraryLoader::MacLibraryLoader(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in mac_library_loader.cpp.o</div>
</div></div><div> .....</div><div><br></div><div>It seems __Unwind_Resume is referenced in just about every .cpp file I compile.</div><div><br></div><div>The only change I've made from my original, i386-only project was add </div>
<div><br></div><div><div><span style="white-space:pre-wrap">        </span>if(APPLE)</div><div><span style="white-space:pre-wrap">                </span>SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64")</div>
<div><span style="white-space:pre-wrap">                </span>set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)</div><div><span style="white-space:pre-wrap">        </span>endif()</div></div><div><br></div>
<div>Does anyone know what is going on?</div><div><br></div><div>Thanks a lot,</div><div><br></div><font color="#888888"><div>Pedro d'Aquino</div><div><br></div><div><br></div><div><br></div><div><br></div>
</font></blockquote></div><br></div>