English 中文(简体)
arm-angstrom-linux-gnueabi-gcclinker未能与uclibc挂钩
原标题:arm-angstrom-linux-gnueabi-gcc linker fails to link against uclibc

我正试图为中风气铺设申请(在我的案件中使用校准而不是校准)。 我正在使用假肢和开张。 有了简单的工具链,我就能够成功地建立起来,只添加<代码>-muclibc旗帜。 绕开我的建筑指挥是:

arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/hnsl/stuff/tmp/sysroots/armv7a-angstrom-linux-gnueabi -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb2 -Wl,-O1 -Wl,--hash-style=gnu -muclibc mainThread.cpp lib.cpp -lportaudio

www.un.org/spanish/ga/president Portaudio (-lportaudio) 成功链接。 Uclibc(我认为)没有联系;我发现这些错误:

 /tmp/ccW4SVb4.o: In function `main :
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/mainThread.cpp:68: undefined reference to `__cxa_end_cleanup 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/mainThread.cpp:68: undefined reference to `__cxa_begin_catch 
| /tmp/ccW4SVb4.o: In function `operator<< <std::char_traits<char> > :
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/ostream:513: undefined reference to `std::cerr 
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/ostream:513: undefined reference to `std::cerr 
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/ostream:513: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int) 
| /tmp/ccW4SVb4.o: In function `std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&)) :
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/ostream:113: undefined reference to `std::cerr 
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/ostream:113: undefined reference to `std::cerr 
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/ostream:113: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&) 
| /tmp/ccW4SVb4.o: In function `main :
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/mainThread.cpp:68: undefined reference to `__cxa_end_catch 
| /tmp/ccW4SVb4.o: In function `operator<< <std::char_traits<char> > :
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/ostream:511: undefined reference to `std::cerr 
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/ostream:511: undefined reference to `std::cerr 
| /tmp/ccW4SVb4.o: In function `std::basic_ios<char, std::char_traits<char> >::setstate(std::_Ios_Iostate) :
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/bits/basic_ios.h:148: undefined reference to `std::basic_ios<char, std::char_traits<char> >::clear(std::_Ios_Iostate) 
| /tmp/ccW4SVb4.o: In function `main :
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/mainThread.cpp:68: undefined reference to `__cxa_end_catch 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/mainThread.cpp:68: undefined reference to `__cxa_end_cleanup 
| /tmp/ccW4SVb4.o: In function `__static_initialization_and_destruction_0 :
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/iostream:73: undefined reference to `std::ios_base::Init::Init() 
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/iostream:73: undefined reference to `std::ios_base::Init::~Init() 
| /home/hnsl/stuff/tmp/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.5.3/iostream:73: undefined reference to `std::ios_base::Init::~Init() 
| /tmp/ccW4SVb4.o:(.ARM.extab+0x0): undefined reference to `__gxx_personality_v0 
| /tmp/ccW4SVb4.o:(.ARM.extab+0x28): undefined reference to `typeinfo for char const* 
| /tmp/ccUEShoN.o: In function `endOnError(void*, int, char*) :
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:23: undefined reference to `__cxa_allocate_exception 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:23: undefined reference to `typeinfo for char const* 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:23: undefined reference to `typeinfo for char const* 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:23: undefined reference to `__cxa_throw 
| /tmp/ccUEShoN.o: In function `initFramework(char**, void**, PaStreamParameters*, PaStreamParameters*) :
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:32: undefined reference to `__cxa_allocate_exception 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:32: undefined reference to `typeinfo for char const* 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:32: undefined reference to `typeinfo for char const* 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:32: undefined reference to `__cxa_throw 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:37: undefined reference to `__cxa_allocate_exception 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:37: undefined reference to `typeinfo for char const* 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:37: undefined reference to `typeinfo for char const* 
| /home/hnsl/stuff/tmp/work/armv7a-angstrom-linux-gnueabi/cphone-1.0.0-r1/lib.cpp:37: undefined reference to `__cxa_throw 
| collect2: ld returned 1 exit status

成就

最佳回答

您确实应当使用<代码>g++汇编和链接C++代码。 它将注意增加标准C++图书馆的道路和链接选择。

可使用<代码>gcc,但总是使用<代码>g++>/code>进行汇编和链接比较容易。

问题回答

暂无回答




相关问题
gcc -fPIC seems to muck with optimization flags

Following along from this question: how-do-i-check-if-gcc-is-performing-tail-recursion-optimization, I noticed that using gcc with -fPIC seems to destroy this optimization. I am creating a shared ...

Generate assembler code from C file in linux

I would like to know how to generate assembler code from a C program using Unix. I tried the gcc: gcc -c file.c I also used firstly cpp and then try as but I m getting errors. I m trying to build an ...

Getting rid of pre-compiled headers

OK, I have old Metrowerks code for Mac and Windows where the previous developer used pre-compiled headers for every project that this code base builds. How does one get rid of Pre-compiled headers, ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

How to compile for Mac OS X 10.5

I d like to compile my application for version 10.5 and forward. Ever since I upgraded to Snow Leopard and installed the latest XCode, gcc defaults to 10.6. I ve tried -isysroot /Developer/SDKs/...

热门标签