SOs and Templates
I am trying to do something very simple, yet I can't get the Sun Forte 6 C++ compiler to do it. I know it is probably my fault, but I don't know...
I am compiling a file containing:
<pre>
#include <string>
std::string Foo(void) { return std::string("Foo"); };
</pre>
With the command:
<pre>
/export/home/Forte6/SUNWspro/bin/CC \
-G \
-KPIC \
-zdefs \
-mt \
-g \
-instances=extern \
-library=libC,Cstd,Crun \
-lc \
-ldl \
-lCstd \
-o test.so \
-h test.so \
test.cpp
</pre>
And the result is:
<pre>
Undefinedfirst referenced
symbolin file
std::basic_string<char,std::char_traits><char>,std::allocator<ch ar> >::basic_string(const char*,const std::allocator<char&>)test.o
ld: fatal: Symbol referencing errors. No output written to test.so
</pre>
Please let me know if you can think of anythin that I could try!
Thanks,
Mike
mmcintosh@acm.org

