我到最后的链接命令(实际可执行文件被链接),但我得到了一个未定义符号的一堆(和他们在CPP和看起来很吓人我,一个简单的C程序员)

- 它可能是简单的东西,但我不能得到什么IM应该把作为连接器(?这里其使用gcc ...是适当的g ++告诉我,输入文件太多笑?)(LD返回大致相同的)

反正它的荒谬,我完全卡住

谢谢你们的帮助!

make
Making all in docs
Making all in en
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all-am'.
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0  -arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks  -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -miphoneos-version-min=2.0 -I../include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk -O0  -arch armv6 -pipe -std=c99 -gdwarf-2 -mthumb -I../include -L../libs -L../../libs -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib  -o mutella  -L/usr/local/lib uilocalsocket.o gnumarkedfiles.o uitextmode.o sha1.o sha1thread.o gnuwordhash.o gnulogcentre.o asyncdns.o gnuwebcache.o uiterminal.o uiremote.o asyncproxysocket.o messages.o lineinput.o rcobject.o event.o term_help.o mprintf.o readline4fix.o asyncfile.o tstring.o dir.o inifile.o property.o byteorder.o mui.o gnusearch.o mthread_unix.o asyncsocket.o controller.o preferences.o packet.o gnuupload.o gnusock.o gnushare.o gnunode.o gnuhash.o gnudownload.o gnudirector.o gnucache.o conversions.o common.o main.o  -lpthread -lreadline -lcurses  -lpoll -lz
Undefined symbols:
  "std::__throw_bad_alloc()", referenced from:
      __gnu_cxx::new_allocator<std::_List_node<MUILSocketCommunicate*> >::allocate(unsigned long, void const*)in uilocalsocket.o
      __gnu_cxx::new_allocator<SMarkedFile>::allocate(unsigned long, void const*)in gnumarkedfiles.o
      __gnu_cxx::new_allocator<std::_List_node<long> >::allocate(unsigned long, void const*)in gnumarkedfiles.o
      __gnu_cxx::new_allocator<std::_Rb_tree_node<TString<char> > >::allocate(unsigned long, void const*)in gnumarkedfiles.o
      __gnu_cxx::new_allocator<std::_Rb_tree_node<long> >::allocate(unsigned long, void const*)in gnumarkedfiles.o
      __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<long const, MFileSizeClass> > >::allocate(unsigned long, void const*)in gnumarkedfiles.o
有帮助吗?

解决方案

看来你正在试图与C(GCC)接头呼叫链接C ++代码。这将不包括相应的库这是你看到什么。尝试克++代替GCC(或抛出C ++代码/库)。

其他提示

...添加-lstdc++或使用克++用于链接。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top