This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: thread build on solaris


H.J -

hmm.

That worked (thanks) but exactly why did it work? Shouldn't gcc be
smart enough to realize that it is working either with a c++ file or
linking to a c++ library?

Ed

It's part of a configure test as part of

On Fri, Oct 17, 2008 at 9:24 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Sat, Oct 18, 2008 at 11:13 AM, Edward Peschko <horos11@gmail.com> wrote:
>> All,
>>
>> I'm trying to compile a thread with the boost, threading libraries,
>> and am getting errors like these.
>>
>>    gcc -o conftest -g -O2
>> -I/GAAL/pesced_release/install/fuego/include/boost-1_36
>> -L/GAAL/pesced_release/install/fuego/lib /tmp/aa.c
>> -lboost_thread-gcc43-mt
>>
>> /GAAL/pesced_release/install/fuego/lib/libboost_thread-gcc43-mt.so:
>> undefined reference to `__cxa_allocate_exception@CXXABI_1.3'
>> /GAAL/pesced_release/install/fuego/lib/libboost_thread-gcc43-mt.so:
>> undefined reference to `std::basic_string<char,
>> std::char_traits<char>, std::allocator<char>
>>>::_Rep::_M_destroy(std::allocator<char> const&)@GLIBCXX_3.4'
>> /GAAL/pesced_release/install/fuego/lib/libboost_thread-gcc43-mt.so:
>> undefined reference to `std::bad_alloc::~bad_alloc()@GLIBCXX_3.4'
>> /GAAL/pesced_release/install/fuego/lib/libboost_thread-gcc43-mt.so:
>> undefined reference to `__cxa_throw@CXXABI_1.3'
>>
>> This is on solaris 2.10, using gnu ld (version 2.18..)
>>
>> Any ideas on how to get around this?
>>
>
> Please use g++ instead of gcc.
>
>
> --
> H.J.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]