undefined reference to `std::ios_base::Init::Init()
2012-10-23 09:31
525 查看
用gcc(C编译器)编译C++程序,会报标题的错误。
原因是用gcc编译c++程序时,链接的库文件为libstdc++.so,而不是默认的libc.so,因此需要用-lstdc++参数指明,否则会在链接时发生错误.
如: gcc helloworld.cpp -lstdc++
原因是用gcc编译c++程序时,链接的库文件为libstdc++.so,而不是默认的libc.so,因此需要用-lstdc++参数指明,否则会在链接时发生错误.
如: gcc helloworld.cpp -lstdc++
相关文章推荐
- undefined reference to `std::ios_base::Init::Init() 解决
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题——gcc编译C++代码
- undefined reference to `std::ios_base::Init::Init()
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- undefined reference to `std::__detail::_List_node_base@GLIBCXX_3.4.10
- linux 下多线程错误 undefined reference to `sem_init'
- iOS开发 引入第三方报错"std::_List_node_base::unhook() ", referenced from
- undefined reference to `_Ux86_64_init_local'
- ios 编译过程中碰到std::ios_base::Init::~Init()错误的问题解决方法
- NDK 编译时出现 algorithm,vector std::ios_base::Init::Init() , 以及ostream等问题解决方案
- DEV -C++ 中的 [Linker error] undefined reference to `__cpu_features_init' 错误
- (.text+0x168): undefined reference to `uart0_init'
- 编译问题:undefined reference to `MyInitBitMap'
- 解决DEV C++编译时出现的“ undefined reference to `___dyn_tls_init_callback'...”问题
- 解决linux 下多线程错误 undefined reference to `sem_init'