1、创建c++项目
1、配置RUN/DEBUG
2、点击run/debug就可以
4、Type ‘xxxx’ could not be resolved
①选择工程->Properties->C/C++ General->Indexer
②勾选Enable project specific settings
③勾选Index unused headers as C++ files
5、代码提示设置
查看当前gcc版本:gcc- v
启动Eclipse,进入:Windows–>Preferences–>C/C++–>Build–>Environment
增加两个变量:
CPLUS_INCLUDE_PATH: /usr/include/c++/版本号
C_INCLUDE_PATH: /usr/include设置变量之后还不能提示
进入Windows–>Preferences–>C/C++–>Editor–>Content Assist–>Advanced
钩上Parsing-based Proposals
6、cin 输入结束
ctr + d
7、编译加入动态连接库 -lQuantLib
Project->Properties>C/C++ Build>Settings
在G++ Compiler command line pattern最后加入-lQuantLib
在G++ Linker command line pattern最后加入-lQuantLib
8、一个工程多个含有main的文件,怎么编译运行
一次只能编译运行一个,不然会报multiple definition of main
为了一次只编译运行一个,其他文件都exclude from build右键点击文件(夹)
Resource Configurations
exclude from build
本文档提供了详细的步骤来解决Eclipse中C++项目的常见配置问题,包括创建项目、配置运行/调试环境、解决代码提示问题、处理多个main文件等。同时也介绍了如何配置动态链接库及输入操作。
9638

被折叠的 条评论
为什么被折叠?



