Unresolved mcount profiling solaris dynamic library (gcc 3.1)
Posted on 2002-07-22
I have built executables and static libraries with the compiler and linker "-pg" option in order to get profile information. That's ok.
Now I am trying to build a dynamic library in the same way, but I am getting the following linker error:
Undefined first referenced
symbol in file
ld: warning: Symbol referencing errors
The whole linker command (once every file has been compiled) is the one showed here:
g++ -shared -dynamic -Wl,-z,now -Wl,-B,symbolic -pg -Wl,-h,libcstring.so.2.6 obj/cstring.o obj/argument.o obj/getpassword.o obj/mapass.o obj/witherror.o -olib/libcstring.so.2.6
I have searched for help for some days in news groups and search engines and I have seen this question posted multiple times but never solved.
Some help would be appreciated.