stdcxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liviu Nicoara <nico...@roguewave.com>
Subject Re: Problem building Tuscany SDO with stdcxx on Linux
Date Thu, 12 Oct 2006 14:04:39 GMT
The symbol is part of the libsupc++ which g++ links by default. Since 
you link with gcc, you need to add it explicitly.

HTH,
Liviu

Geoffrey Winn wrote:
> Apologies for the delay in responding, it's taken me a while to persuade 
> the
> Tuscany build system to do what I want on Linux. Anyway, I'm down to one
> problem, and that occurs while linking a test program. Is the reference to
> __cxa_pure_virtual familiar to anyone?
> 
> gcc -nostdinc++ -g -O2 -g -O2 -o .libs/tuscany_sdo_test sdotest.o 
> sdotest2.o
> utils.o main.o  -L/home/tuscany/worksp
> ace/SDO_stdcxx/sdo/runtime/core/src/commonj/sdo
> /home/tuscany/workspace/SDO_stdcxx/sdo/runtime/core/src/commonj/sdo
> /.libs/libtuscany_sdo.so -L/usrlib -L/home/tuscany/workspace/stdcxx/stdcxx-
> 4.1.3/Debug/lib /usr/lib/libxml2.so -lpt hread -lz -lm -lstd15d -Wl,--rpath
> -Wl,/home/tuscany/workspace/SDO_stdcxx/sdo/deploy/lib
> /home/tuscany/workspace/SDO_stdcxx/sdo/runtime/core/src/commonj/sdo/.libs/libtuscany_sdo.so:

> 
> undefined reference to  `__cxa_pure_virtual'
> 
> Thanks in advance.
> 
> Regards,
> 
> Geoff.
> 
> On 04/10/06, Martin Sebor <sebor@roguewave.com > wrote:
>>
>> Geoffrey Winn wrote:
>> > We use automake to drive the build of SDO, and the compile and link
>> happen
>> > as separate events. Before I started the transition to stdcxx we used
>> > g++ as
>> > both the compiler and linker. I now use gcc as the compiler but I'm not
>> > sure
>> > what to use as the linker. Are there any examples in the stdcxx
>> > test/examples where the code is compiled and linked as separate
>> commands?
>> > Then (being lazy) I could plagiarise that example.
>>
>> Yes, they all should be compiled and linked in two separate steps
>> (when the don't it's not intended). You can see a sample command
>> line when building the examples. For instance, here are the
>> commands to build the accumulate example with gcc (taken from
>> our nightly build log of a 12d build type; btw., the logs along
>> with the test results will be available shortly on our web page):
>>
>> gcc -c
>> -I/build2/batman/5.0.0/builds/33131907/source-buildspace/include/ansi
>>   -D_RWSTD_USE_CONFIG
>> -I/build2/batman/5.0.0/builds/33131907/source-buildspace/include
>> -I/build2/batman/5.0.0/builds/33131907/source-buildspace/build/include
>> -I/build2/batman/5.0.0/builds/33131907/source-buildspace/examples/include
>>   -pedantic -nostdinc++ -O2  -W -Wall -Wcast-qual -Winline -Wshadow
>> -Wwrite-strings -Wno-long-long -Wcast-align
>> /build2/batman/5.0.0/builds/33131907/source-buildspace/examples/manual/accumulate.cpp

>>
>>
>>
>> gcc accumulate.o -o accumulate
>> -L/build2/batman/5.0.0/builds/33131907/source-buildspace/build/lib -lstd
>>   -lsupc++ -lm
>>
>> Martin
>>
> 


Mime
View raw message