[CMake] Linking against OS X Frameworks
ML
mailinglists at MailNewsRSS.com
Tue Aug 11 14:27:47 EDT 2009
Hi All,
>> CoreServices.framework/Headers/CoreServices.h:20:6: error: #error 64-
>> bit not supported
> As I said in my last reply, the 10.4 SDK does not support 64 bit
> development. You are explicitly telling CMake to use the 10.4 SDK and
> you are also, explicitly or implicitly, telling it to build as 64 bit.
> Those two things are not compatible.
OK, here is what I have done now:
1. Downloaded latest CMake 2.7 from CVS, compiled and installed in /
opt/cmake-2.7/ as to not interfere with anything else.
2. edited my .profile to include the above path
3. verified version of cmake I would be getting when executing cmake
from a command-line
[jtsm at Jason-T-Slack-Moehrles-MacBook-Pro ~]$ cmake -version
cmake version 2.7.20090811
4. Created an 'initialCache.cmake' file that contains:
# Apple Specific
set (CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk)
set (CMAKE_OSX_DEPLOYMENT_TARGET=10.4)
set (CMAKE_OSX_ARCHITECTURES="i386;ppc")
5. From a command-line I now run:
cmake -CinitialCache.cmake .
6. I get the same errors like: (and I knew I would)
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/
CoreServices.framework/Headers/CoreServices.h:20:6: error: #error 64-
bit not supported
7. Googling around I found: (with a tidbit from Sean...)
http://www.cyberciti.biz/tips/compile-32bit-application-using-gcc-64-bit-linux.html
Which says for gcc to compile
in 32-bit: gcc -m32 -o output32 hello.c
in 64-bit: gcc -m64 -o output64 hello.c
8. My question is now what can I set in my initial cache to tell gcc
to set 32-bit by default? Or if i can't do this in initial cache, how
do I solve it? Am I on the right track with this logic?
Best,
-Jason
More information about the CMake
mailing list