eclipse 利用已有c++代码建工程,并编译执行
2024-08-21 10:10:13
如果你想建一个带Makefile的c++ 工程
1. 新建一个C++空工程,工程类型是makefile project,选择Linux GCC;
2. 将源码连同makefile文件一同作为一个文件系统导入,
File -> import -> General -> File System,选中要导入的代码,导入
此时,eclipse便会根据代码中的makefile文件编译工程,而不是使用eclipse自己生成的makefile文件。
3、要保证自己的Makefile文件是正确的,不然会提示错误
4、如果编译不需要Makefile,可以project->properity->c++ build -> build command: eg
g++ ${workspace_loc:/code333}/main.cpp -O3 -lpthread -msse2 这个例子里, 我想要编译main.cpp
参考资料 http://www.linuxidc.com/Linux/2011-02/32763.htm
最新文章
- Android 算法 关于递归和二分法的小算法
- 用SQL SERVER取分组数据第一条:查出每个班级的成绩第一名
- 关于调整input里面的输入光标大小
- NOIP欢乐模拟赛 T1 解题报告
- 如何解决虚拟机克隆导致";Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System eth0'.";
- Ehcache(2.9.x) - API Developer Guide, Cache Eviction Algorithms
- css3学习笔记之用户界面
- SQLite DBHelp
- jquery获取元素的所有宽高(包括内边距和外边距)
- angularjs中动态为audio绑定src
- J1002.JavaFX简介
- ●UOJ58 [WC2013]糖果公园
- Zara精讲C#.Cache、它和Redis区别是什么???
- >;maven-compiler-plugin的理解
- keepalived与zookeeper
- PHP:第三章——PHP中控制函数的函数
- Servlet介绍(一)
- How to Integrate JCaptcha in Spring Security
- Python之路(六)--->; 函数、变量
- Red Hat系统安装Redis
热门文章
- Android Service Intent must be explicit的解决方法
- Flume-ng+Kafka+storm的学习笔记
- 第四篇 SQL Server代理配置数据库邮件
- APN 推送
- escape()、encodeURI()、encodeURIComponent() difference
- Regist
- android 测试(转)
- JSon_零基础_005_将po(bean)对象集合List转换为JSon格式的对象字符串,返回给界面
- 转:装完Centos7提示Initial setup of CentOS Linux 7 (core)
- linux挂接U盘