uClinux中c++应用程序编译求助!!
用的是snapgear的uClinux 2.0 uClibc ,目标机芯片是leon2,sparc体系的。
用的是sparc-linux-tools-1.0.1
下列c++程序:testcpp.cxx
#include <iostream>
using namespace std;
int main(int argc,char **argv) {
cout<<"Hello world, i am a cxx program!"<<endl;
return 1;
}
makefile中:
LDXXFLAGS= -nostartfiles /home/friky/embeded/snapgear-p33a/lib/uClibc/lib/crt1.o /home/friky/embeded/snapgear-p33a/lib/uClibc/lib/crti.o -L/home/friky/embeded/snapgear-p33a/lib/uClibc/lib -L/home/friky/embeded/snapgear-p33a/lib/libnet -Bstatic -elf2flt -mno-relax -mno-relax -mpic-none /opt/sparc-linux/sparc-linux/lib-uclibc-stdc++/crtbegin.o -L /opt/sparc-linux/sparc-linux/lib -L /home/friky/embeded/snapgear-p33a/uClibc/libc -L /opt/sparc-linux/sparc-linux/lib-uclibc-stdc++ -L /opt/sparc-linux/sparc-linux/lib-uclibc-stdc++/pic-none -L /opt/sparc-linux/sparc-linux/lib-uclibc-stdc++/soft -L /opt/sparc-linux/sparc-linux/lib-uclibc-stdc++/v8
LDXXLIBS= -nodefaultlibs -lc -lgcc -lstdc++ /opt/sparc-linux/sparc-linux/lib-uclibc-stdc++/crtend.o /home/friky/embeded/snapgear-p33a/lib/uClibc/lib/crtn.o
$(CC) -Wl,--start-group $(LDXXFLAGS) -o testcpp testcpp.o -lstdc++ $(LDXXLIBS) -Wl,--end-group
执行make时提示:
testcpp.elf2flt(.text._ZNSt5ctypeIcE13classic_tableEv+0x2c): In function `std::ctype<char>::classic_table()':
:对‘__ctype_b_loc’未定义的引用
testcpp.elf2flt(.text._ZNSt5ctypeIcEC2EPiPKtbj+0x60): In function `std::ctype<char>::ctype[not-in-charge](int*, unsigned short const*, bool, unsigned)':
:对‘__ctype_toupper_loc’未定义的引用
testcpp.elf2flt(.text._ZNSt5ctypeIcEC2EPiPKtbj+0x6c): In function `std::ctype<char>::ctype[not-in-charge](int*, unsigned short const*, bool, unsigned)':
:对‘__ctype_tolower_loc’未定义的引用
testcpp.elf2flt(.text._ZNSt5ctypeIcEC2EPiPKtbj+0x84): In function `std::ctype<char>::ctype[not-in-charge](int*, unsigned short const*, bool, unsigned)':
:对‘__ctype_b_loc’未定义的引用
。。。。。。。。。。。。。。。
求助.......................................
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论