- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#include
#include
voidcrump(void);
"src/sample.cpp"
#include"sample.h"
usingnamespacestd;
voidcrump(void)
{
cout<<"in crump now"<
}
Build testIPPStatic of project testIPPStatic with configuration Debug
Libtool build/Debug/libtestIPPStatic.a normal i386
cd /Users/sharadh/Documents/testIPPStatic
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/local/bin/icc-11.1-base/bin/intel64/icpc -arch i386 -syslibroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/sharadh/Documents/testIPPStatic/build/Debug -filelist /Users/sharadh/Documents/testIPPStatic/build/testIPPStatic.build/Debug/testIPPStatic.build/Objects-normal/i386/testIPPStatic.LinkFileList -staticlib -o /Users/sharadh/Documents/testIPPStatic/build/Debug/libtestIPPStatic.a
xilibtool: executing 'libtool'
libtool: unknown option character `n' in: -no_compact_unwind
Usage: libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT]
Usage: libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table
Command /Developer/usr/local/bin/icc-11.1-base/bin/intel64/icpc failed with exit code 1
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a bug. The compiler added the option -Wl,-no_compact_unwind by default to resolve the problem reported here:
http://software.intel.com/en-us/forums/showthread.php?t=69895
Unfortunate, libtool does not support this option. I have reported a bug on this issue. ID DPD200151036 for your reference.
In the mean time, you mentioned that you were able build this as a static from command line by calls to icpc and ar. One work around you could try in Xcode is to add a new build phase to your target,
Select target -> Project -> New Build Phase -> New Run Script Build Phase -> enter script "ar command that you used from the command line".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot, esp. for the quickness of your response ... at least for this dummy program I got the static library built and linked against it .... hopefully I can do the same for the big project!
Sharadh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another workaround that might be easier is to add the complete libtool command line with out the -no_compact_unwind option to the custom build phase. You can get the complete libtool command line by addingthe option -v to the command line options inXcode.
icpc -v -staticlib test1.cpp test2.cpp will give you something like this:
....
xilibtool: executing 'libtool'
libtool \ (you need the libtool command from here).
-static \
-arch_only \
x86_64 \
-no_compact_unwind \ (Remove this when you add it to the custom build phase).
-o \
a.out \
/tmp/icpc0ZXHCP.o \
/tmp/icpciR7qMm.o \
-L/opt/intel/Compiler/11.1/084/lib \
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64/ \
-L/usr/lib/i686-apple-darwin10/4.2.1/ \
-L/usr/lib/ \
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 \
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/ \
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1/ \
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.. \
/opt/intel/Compiler/11.1/084/lib/libimf.a \
/opt/intel/Compiler/11.1/084/lib/libsvml.a \
/opt/intel/Compiler/11.1/084/lib/libipgo.a \
/opt/intel/Compiler/11.1/084/lib/libdecimal.a \
/opt/intel/Compiler/11.1/084/lib/libirc.a
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page