|
|
On Jun 24, 4:21 pm, Andi <aander...@xxxxxxxxxxxxxxxxxxx> wrote:
> Hi all,
> I want to build the application without using C++ exceptions. I use
> STL collections vector, queue, deque but only the operations which
> don't throw exceptions. The application is built with the compiler
> options -fno-exceptions and -fno-rtti. We work with WindRiver/
> Dinkumware Libraries.
>
> ---------------------------------------
> Now I get the following linker error:
> Build Started in Project 'rtptest': 2008-06-24 08:17:40
> Generation of makefiles started.
> Generation of makefiles finished (Elapsed Time: 00:00).
> Platform: Wind River VxWorks 6.4
> Command: make --no-print-directory BUILD_SPEC=PPC32gnu_RTP
> DEBUG_MODE=1 TRACE=1 clean all
> Working Directory: C:/Nemo/Software/OS/rtptest
> make: removing targets and objects of C:/Nemo/Software/OS/rtptest
> echo "building PPC32gnu_RTP_DEBUG/main.o"; c++ppc -g -mhard-float -
> mstrict-align -mregnames -ansi -mrtp -Wall -MD -MP -fno-rtti -fno-
> exceptions -IC:/Programme/WindRiver_PID_3_4/vxworks-6.4/target/us
> r/h -IC:/Programme/WindRiver_PID_3_4/vxworks-6.4/target/usr/h/wrn/
> coreip -D_VX_CPU=_VX_PPC32 -D_VX_TOOL_FAMILY=gnu -D_VX_TOOL=gnu -
> o "PPC32gnu_RTP_DEBUG/main.o" -c "main.cpp"
> building PPC32gnu_RTP_DEBUG/main.o
> echo "building PPC32gnu_RTP_DEBUG/rtptest.vxe"; c++ppc -mhard-float -
> mstrict-align -mregnames -ansi -mrtp -Wall -MD -MP -mrtpi -fno-
> exceptions -fno-rtti -o "PPC32gnu_RTP_DEBUG/rtptest.vxe" PPC32gnu_R
> TP_DEBUG/main.o -lstdc++ -LC:/Programme/WindRiver_PID_3_4/
> vxworks-6.4/target/usr/lib/ppc/PPC32/common -Wl,--start-group -Wl,--
> end-group && if [ "0" = "1" ]; then mv -f "PPC32gnu_RTP_DEBUG/rtptes
> t.vxe" "PPC32gnu_RTP_DEBUG/rtptest.vxe.unstripped" && stripppc -g -o
> "PPC32gnu_RTP_DEBUG/rtptest.vxe" "PPC32gnu_RTP_DEBUG/
> rtptest.vxe.unstripped";fi && if [ "0" = "1" ]; then plink
> "PPC32gnu_RTP_DEBUG
> /rtptest.vxe";fi
> building PPC32gnu_RTP_DEBUG/rtptest.vxe
> PPC32gnu_RTP_DEBUG/main.o(.gnu.linkonce.t._ZNKSt6vectorIiSaIiEE5_XlenEv
> +0x48): In function `std::vector<int, std::allocator<int> >::_Xlen()
> const':
> C:\Nemo\Software\OS\rtptest/main.cpp:14: undefined reference to
> `std::exception::_Raise() const'
> PPC32gnu_RTP_DEBUG/main.o(.gnu.linkonce.t._ZNKSt6vectorIiSaIiEE5_XranEv
> +0x48): In function `std::vector<int, std::allocator<int> >::_Xran()
> const':
> C:\Nemo\Software\OS\rtptest/main.cpp:14: undefined reference to
> `std::exception::_Raise() const'
> PPC32gnu_RTP_DEBUG/main.o(.gnu.linkonce.t._ZNKSt5dequeIiSaIiEE5_XlenEv
> +0x48): In function `std::deque<int, std::allocator<int> >::_Xlen()
> const':
> C:\Nemo\Software\OS\rtptest/main.cpp:14: undefined reference to
> `std::exception::_Raise() const'
> collect2: ld returned 1 exit status
> C:\Programme\WindRiver_PID_3_4\vxworks-6.4\host\x86-win32\bin
> \make.exe: *** [PPC32gnu_RTP_DEBUG/rtptest.vxe] Error 1
> Build Failed in Project 'rtptest' (Process Exit Value was 2):
> 2008-06-24 08:17:48 (Elapsed Time: 00:08)
> -------------------------------
>
> What is missing? Do I need to rebuild some libraries?
> Thanks
> Andi
Hi Andi,
I'm not the one who can answer your question correctly but I can see
the error message that
C:\Nemo\Software\OS\rtptest/main.cpp:14: undefined reference to
`std::exception::_Raise() const'
The error is from 14th line of main.cpp. That's all I can think
about.
I have a question for you. Why do you want not to use fno_exceptions
and fno_rtti? Is there any benefit by avoiding exceptions and rtti?
cheers,
Alex Kim
|
|