当前位置: 技术问答>linux和unix
问个比较基本的问题
来源: 互联网 发布时间:2015-07-26
本文导语: 怎样在linux下使用STL和其本地库共同工作 例如如下形式代码能够编译通过 #include #include #include #include #include int main() { 主程序代码 } | 你一定是忘了在C头文件前边加extern "c"了。 这...
怎样在linux下使用STL和其本地库共同工作
例如如下形式代码能够编译通过
#include
#include
#include
#include
#include
int main()
{
主程序代码
}
例如如下形式代码能够编译通过
#include
#include
#include
#include
#include
int main()
{
主程序代码
}
|
你一定是忘了在C头文件前边加extern "c"了。
这是C/C++的基本知识。
要努力打好基础,连基本知识都没掌握好,是用不好STL的。
这是C/C++的基本知识。
要努力打好基础,连基本知识都没掌握好,是用不好STL的。
|
这样的代码有何问题?使用g++编译即可,最多加上-I、-L等参数而已
|
如果用动态库可以用OPENDL .....
如果静态联结就GCC 后面加 -Lxxx.xx
如果静态联结就GCC 后面加 -Lxxx.xx
|
using g++ compiler
|
g++