Results 1 to 1 of 1
2001-10-26, 15:34 #1terrymacGuest
C++ compile/link problems using STL on Solaris
We have implemented a version of the C++ STL in a Solaris 2.6 environment using Sun's WorkShop Compiler C++ 4.2. We get the symbol referencing errors (see output below) when we try to use a hash map in the program. The "__stl_prime_list" which gives the error is declared in hashtable.h as static const array of unsigned long's.
If, however, we compile in debug mode (using -g flag), we don't have a problem. We have used the "nm" command to look at the symbols in the object files and sure enough, when compiled in debug mode, everything is peachy, but without debug, the symbol is, for lack of a better word, toast.
One of our developers believes it has to do with the fact that debug mode uses "stabs".
It seems to be a combination of "static const" and templates that cause the problem. We've tried using a centralized template database but it makes no difference. We are also using static libraries but we've tried compiling/linking everything in one statement without libraries with no effect.
Has anyone seen this type of problem on this or any other platform?
Here is the output from the compile/link.
/opt/SUNWspro/SC4.2/bin/CC SpeedTestCanadianRoutingMap.cpp -o
SpeedTestCanadianRoutingMap +p -KPIC -temp=/var/tmp
-I/home/logic7/macfar/stl -DCOMPILE_STYLE=CPP_COMPILE -DNONE_CLASH
-DRW_STD_TYPEDEFS -mt -I/vobs/forecast/FC/common -I.
-L/software/Rogue7.0.A/lib -L/lib -L/software/oracle8/lib -lsql8 -lclntsh
-lctx8 -lFramework -lDbUt -ltls7s -ldbt7s -lor87s -lm -lmp -lsocket -lnsl
template manager : Warning: No valid template database available. Creating
default repository "Templates.DB".
Undefined first referenced
symbol in file
ld: fatal: Symbol referencing errors. No output written to
*** Error code 1
clearmake: Error: Build script failed for "SpeedTestCanadianRoutingMap"