uresolved error for unused functions
uresolved error for unused functions
- Subject: uresolved error for unused functions
- From: Denis Osadchy <email@hidden>
- Date: Wed, 31 Jan 2007 18:17:49 +0600
- Organization: UniPro
I have XCode project which is linked with static library.
Project can not be linked - link fails with errors like
"mylib.lib(file.o)" reference to undefined class:method()"
class:method() is never used it is just declared in one of included
files.
Both projects have Setting Dead Code Stripping set to true, Strip
Style - All symbols.
I have also added
"-Wl,-static -fvtable-gc -fdata-sections -ffunction-sections
-Wl,--gc-sections -Wl,-s" to "Other C Flags" and "Other C++ Flags" according to
http://www.arcknowledge.com/gmane.comp.gcc.help/2003-08/msg00131.html
But problem still exists.
(I see
warning: switch '-fvtable-gc' is no longer supported
i686-apple-darwin8-gcc-4.0.1: -static: linker input file unused because linking not done
i686-apple-darwin8-gcc-4.0.1: -gc-sections: linker input file unused because linking not done
may be "Other C Flags" is not correct place to set these flags?
)
What could cause such problem?
Compile and link commands with all arguments:
Library's gcc flags:
/usr/bin/gcc-4.0 -x c++ -arch i386 -pipe -funsigned-char -fno-asm -Wno-trigraphs -fpascal-strings -fasm-blocks -g -O0 -fwritable-strings -Woverloaded-virtual -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wunknown-pragmas -fmessage-length=0 -fvisibility=hidden -fvisibility-inlines-hidden -Wl,-static -fvtable-gc -ffunction-sections -Wl,-gc-sections -isysroot /Developer/SDKs/MacOSX10.4u.sdk -c ... -o …
Library's link flags:
/usr/bin/libtool -static -arch_only i386 -o -filelist … -syslibroot /Developer/SDKs/MacOSX10.4u.sdk
Main project's gcc flags:
/usr/bin/gcc-4.0 -x c++ -arch i386 -pipe -funsigned-char -Wno-trigraphs -fpascal-strings -fasm-blocks -g -O0 -fwritable-strings -Woverloaded-virtual -Wunused-parameter -Wunused-variable -Wunknown-pragmas -fmessage-length=0 -fvisibility=hidden -fvisibility-inlines-hidden -Wl,-static -fvtable-gc -ffunction-sections -Wl,-gc-sections -isysroot /Developer/SDKs/MacOSX10.4u.sdk -c … -o …
Main project's link flags:
/usr/bin/g++-4.0 -o … -filelist -framework Carbon -arch i386 -Wl,-Y,1455 -Wl,-dead_strip -isysroot /Developer/SDKs/MacOSX10.4u.sdk
--
Best regards,
Denis mailto:email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden