<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
if(APPLE)<br>
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)<br>
endif()<br>
<br>
Hope this helps!<br>
<br>
Ryan<br>
<br>
On 9/10/10 9:19 AM, Pedro d'Aquino wrote:
<blockquote
cite="mid:AANLkTikcAGp7=GBECO2i98BOkagTkCS8rmpgHo_YAN+w@mail.gmail.com"
type="cite">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 moz-do-not-send="true"
href="mailto:budsbd@gmail.com">budsbd@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
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>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the CMake FAQ at: <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University
<a class="moz-txt-link-freetext" href="http://academic.cleardefinition.com/">http://academic.cleardefinition.com/</a></pre>
</body>
</html>