neogui | 2008-09-01 15:57 |
Q: 如何在XCode中使用gcc编译生成的.a库文件? 1. 把你的.a文件添加到^projectName下的任意一個組里(例如默認的Classes組)。 2. 找到Target > ^targetName,在這個^targetName下會有Link Binary With Libraries。把你已經在某組里的那個.a文件拖到Link Binary With Libraries這個Build Phase中。(也可能同時也要添加到某個Copy的Build Phase中...) 3. 提供一個可用的頭文件。 4. Build and Go. |
|
waza | 2008-09-02 02:20 |
do shell script " cd ~/Documents/iphone_svn/iphone/Projects/GTLib; ar crv ./lib/libgtlibd.a ./build/GTLib.build/Debug-iphoneos/GTLib.build/Objects-normal/armv6/GT*.o; ar crv ./lib/libgtlibsd.a ./build/GTLib.build/Debug-iphonesimulator/GTLib.build/Objects-normal/i386/GT*.o; ar crv ./lib/libgtlib.a ./build/GTLib.build/Release-iphoneos/GTLib.build/Objects-normal/armv6/GT*.o; ar crv ./lib/libgtlibs.a ./build/GTLib.build/Release-iphonesimulator/GTLib.build/Objects-normal/i386/GT*.o; " 给你个例子,你把路径什么的改掉就可以了 2. To link to a .a library like this in Xcode you need to:
We use FFTW (it's great by the way), this works for us! |