
gcc version 2.95.3 20010315 (release). It came with OS (SunOS 5.8 x86). After when I compiled & installed bjam I came into boost root dir and give (as it suggessted in docs): bjam "-sTOOLS=gcc". It builds 3 library: libboost_regex.a, libboost_regex.so, libboost_thread.a (while bjam builds library libboost_thread.a it throws messages: " g++: unrecognized option '-pthreads' "). Then I copy them into some dir that included in LD_LIBRARY_PATH environment varyable and copy dir boost to /usr/include. Then I create file with contents: #include <boost/thread/mutex.hpp> main() { return 0; } and compile it with: g++ test.cpp. Results: In file included from /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/../../../../include/g++-3/uti lity:31, from /usr/include/boost/config/select_stdlib_config.hpp:18, from /usr/include/boost/config.hpp:40, from /usr/include/boost/thread/mutex.hpp:15, from test.cpp:1: /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/../../../../include/g++-3/stl _relops.h: In function `bool rel_ops::operator !=(const _Tp &, const _Tp &)': /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/../../../../include/g++-3/stl _relops.h:37: template with C linkage /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/../../../../include/g++-3/stl _relops.h: In function `bool rel_ops::operator >(const _Tp &, const _Tp &)': /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/../../../../include/g++-3/stl _relops.h:42: template with C linkage /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/../../../../include/g++-3/stl _relops.h: In function `bool rel_ops::operator <=(const _Tp &, const _Tp &)': /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/../../../../include/g++-3/stl _relops.h:47: template with C linkage /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/../../../../include/g++-3/stl _relops.h: In function `bool rel_ops::operator >=(const _Tp &, const _Tp &)': /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/../../../../include/g++-3/stl _relops.h:52: template with C linkage and so on and so on... What's wrong? Why it says that STL templates use C linkage? Thanks for help in advance. Sergey Belovolov. b_sv@mail.ru SBelovolov@algorithm.aelita.com
participants (1)
-
Sergey Belovolov