Just tried this on my 10.6 install, and I was getting a linker error when trying to compile for 10.5 - turns out you also need to specify the MACOSX_DEPLOYMENT_TARGET environment variable!Īnyway, here's what I'm doing when running on Mountain Lion (OSX 10.8) to compile for 10.7:Ĭommand line: MACOSX_DEPLOYMENT_TARGET=10.7Ĭmake -G "Unix Makefiles" -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.7.sdk/ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7. Note: CArchDaemonUnix is a class in Synergy (an open source project I'm working on). Ld: symbol(s) not found for architecture i386Ĭlang: error: linker command failed with exit code 1 (use -v to see invocation) However, I now see this error when I compile against 10.7 (which I don't see with 10.8): Undefined symbols for architecture i386:ĮxecSelfNonDaemonized() in libarch.a(CArchDaemonUnix.o)ĬArchDaemonUnix::daemonize(char const*, int (*)(int, char const**)) in libarch.a(CArchDaemonUnix.o) I feel like what I have done here is kinda a huge hack, and it would still be nice with some clarification on how you are supposed to do this.After trying sakra's valid answer (valid as far as CMake is suposed to behave) unsucessfully, I had a dig around and found that if I specify the -sysroot flag to the compiler, it seems to use the correct SDK! The output libSDL2.a ends up in a build folder in ~/Library/Developer/Xcode/DerivedData/, for me it was: ~/Library/Developer/Xcode/DerivedData/SDL-fxroinjqtfjbdnepvpfxwwxxeubu/Build/Products/Release-iphoneos. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |