How to using eclipse to develpe C/C++
2009-07-26 16:42
344 查看
I mainly discuss the use method of making files
When you created a c file, you will make the file in the next step. There are two ways。
1. Default
2. Written by your self
Note: Never tick the "Same as target name"
3.You can do nothing.
right click your project, and then select property. In c/c++ Build, select Behavior, and tick "Build on resource save(Auto build)"
Finally, you should run the exe file in the file: Release/src/srchi
4.In a project, just a main() entry is allowed. Otherwise, you'll gain compiling error.
5. How to solve multiple main
http://weblog.imthewan.com/2010/09/eclipse-cdt-multiple-target/
1) 右击项目,点buildconfigurations create 一个Debug 如:array
2)右击项目中所有其他带main函数的文件,选exclude from build
3)点小锤子旁边的下拉按钮,选array
4)点小锤子可以只编译array.cpp
6. How to use make in eclipse cdt
Eclipse CDT 中使用 Make :http://ejb3.blogbus.com/logs/106960851.html
7.利用j2ee实现多语言支持编程平台。
1)下载完后,先点check for updates(否则没有cdt等),再点install software,此时在available software sites能看到cdt site
2)点work with栏的下拉菜单,选中cdt,然后再一步步点下去。
8. unsolved iostream 等头文件
参考:http://hi.baidu.com/otss/blog/item/911cb762cb1fe6c8e6113a7a.html
真正解决办法:
启动eclipse后,经过 Windows-->Preferences-->C/C++-->Build-->Environment增加Environment variables to set
及点Add添加:
Name: C_INCLUDE_PATH
Value: /usr/include
和
Name: CPLUS_INCLUDE_PATH
Value: /usr/include/c++/4.5.1(这个取决个人的Gcc版本,先察看Gcc版本好,不会?那就man gcc)
就此,理论上应该好了,如果还没有好,尝试以下:
右键你的工程-->C/C++ Build-->Discovery Options-->(找到)Discovery profile: (选择)GCC per project scanner info profile
具体原因估计是传说中的Profile问题!仁者见仁了!
如果还不行,那我就没辙了!^_^
9. ld问题
在indows-->Preferences-->C/C++-->Build-->Settings-》c++ linkers->Libraries 添加需要的库
collect2: ld 返回 1
这个问题,有一次没有实现头文件中定义的方法,抛出ld return 1的错误,还有整个project没有main时,也会有如下错误。被误导了大半天。
When you created a c file, you will make the file in the next step. There are two ways。
1. Default
2. Written by your self
Note: Never tick the "Same as target name"
3.You can do nothing.
right click your project, and then select property. In c/c++ Build, select Behavior, and tick "Build on resource save(Auto build)"
Finally, you should run the exe file in the file: Release/src/srchi
4.In a project, just a main() entry is allowed. Otherwise, you'll gain compiling error.
5. How to solve multiple main
http://weblog.imthewan.com/2010/09/eclipse-cdt-multiple-target/
1) 右击项目,点buildconfigurations create 一个Debug 如:array
2)右击项目中所有其他带main函数的文件,选exclude from build
3)点小锤子旁边的下拉按钮,选array
4)点小锤子可以只编译array.cpp
6. How to use make in eclipse cdt
Eclipse CDT 中使用 Make :http://ejb3.blogbus.com/logs/106960851.html
7.利用j2ee实现多语言支持编程平台。
1)下载完后,先点check for updates(否则没有cdt等),再点install software,此时在available software sites能看到cdt site
2)点work with栏的下拉菜单,选中cdt,然后再一步步点下去。
8. unsolved iostream 等头文件
参考:http://hi.baidu.com/otss/blog/item/911cb762cb1fe6c8e6113a7a.html
真正解决办法:
启动eclipse后,经过 Windows-->Preferences-->C/C++-->Build-->Environment增加Environment variables to set
及点Add添加:
Name: C_INCLUDE_PATH
Value: /usr/include
和
Name: CPLUS_INCLUDE_PATH
Value: /usr/include/c++/4.5.1(这个取决个人的Gcc版本,先察看Gcc版本好,不会?那就man gcc)
就此,理论上应该好了,如果还没有好,尝试以下:
右键你的工程-->C/C++ Build-->Discovery Options-->(找到)Discovery profile: (选择)GCC per project scanner info profile
具体原因估计是传说中的Profile问题!仁者见仁了!
如果还不行,那我就没辙了!^_^
9. ld问题
在indows-->Preferences-->C/C++-->Build-->Settings-》c++ linkers->Libraries 添加需要的库
collect2: ld 返回 1
这个问题,有一次没有实现头文件中定义的方法,抛出ld return 1的错误,还有整个project没有main时,也会有如下错误。被误导了大半天。
相关文章推荐
- how to install jQuery profile on eclipse using Spket
- How to send mail using C++ & CAsyncSocket - SourceCode - 用C++ & CAsyncSocket 如何发送邮件 - 源码 - HackerJLY
- How to make a full-screen application using Symbian C++, 怎样在Sysmbian C++中制作全屏应用程序
- How to automate PowerPoint by using Visual C++ 5.0 or Visual C++ 6.0 with The Microsoft Foundation Classes
- how to using jira in eclipse
- 如何在C++中使用VBScript(使用Qt)--How to use VBScript in C++ (Using Qt)
- How to use an Outlook Object Model from Visual C++ by using a #import statement
- How to setup a basic Struts project using Eclipse IDE
- How to Install Eclipse C/C++ Development Tool--转
- How to access database using C++ & ADO - 如何用C++和ADO访问数据库
- How to call an Oracle Stored Procedure that returns one or more REF CURSORS, using ADO from C++ How
- How to create Linked list using C/C++
- How to get random string using C++ - 用 C++ 如何获取随机字符串
- How to setup a basic Struts project using Eclipse IDE
- How to show a modal dialog and modeless dialog using C++ - 如何用C++显示一个模态对话框和一个非模态对话框
- How to Install Eclipse IDE with C/C++ and Qt V4.7.2 (OpenGL included)
- How to invoke dll using C++ - C++ 如何调用DLL - 详解
- How to get random number within a range using C++ - 如何用C++获取一定范围内的随机数
- How to get the file's icon using C++ - 用C++如何获取文件的图标
- How to compile a dlib example using eclipse in windows?