Geu*_*eus 4 c++ boost cygwin reference undefined
可能重复:
fedora上的gcc链接器错误:未定义的引用
由于我遇到了VC++的问题(gcc不会发生函数重载,因为我的项目合作伙伴是在Linux上编程),我在cygwin上切换到了gcc,但是我也无法在这里运行程序(他能够编译相同的代码而没有任何问题)
我正在尝试编译
$ gcc -I D:/Programme/Boost_Library/boost_1_51 ABI_new.cpp -o ABI
Run Code Online (Sandbox Code Playgroud)
之后我收到了大量的错误:
/tmp/ccO4eSA2.o:ABI_new.cpp:(.text+0xd): undefined reference to ´std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const'
/tmp/ccO4eSA2.o:ABI_new.cpp:(.text+0x60): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
/tmp/ccO4eSA2.o:ABI_new.cpp:(.text+0x9f): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
/tmp/ccO4eSA2.o:ABI_new.cpp:(.text+0xce): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
Run Code Online (Sandbox Code Playgroud)
我不确定这是否必须对程序显然无法读取输入文件(由退出状态指示)做任何事情,但我不知道,为什么这也不起作用,因为 - 再次 - 我的同事对完全相同的代码没有任何问题.
我真的很感激任何tipps.