转:Configure your eclipse for C++
from: http://omtlab.com/configure-your-eclipse-for-c/
Configure your eclipse for C++
This is small sample of how to use eclipse for c++.
There are two ways to use eclipse for C++.
1) Download Eclipse CDT : It is separate eclipse only for C/C++.
2) Download C++ Plugin in you existing eclipse.
I recommend you to download separate Eclipse CDT.
Download from here : http://www.eclipse.org/cdt/
After downloading eclipse CDT you need to download C++ compiler.
I am using MinGW compiler with eclipse. There are some other compiler like : cygwin
You need to install MinGW compiler in your pc.
Download MinGW from here : http://www.mingw.org/
After installing MinGW you need to set environment variable (MINGW_HOME) in you pc.
Name of variable is MINGW_HOME and set MinGW install directory as a path (Example : C:\MinGW).
All are set and now you can open your eclipse CDT.
Create new C++ project.
Goto File > New > C++ Project.

Small popup will open. Enter below details in it.
1) Enter your project name.
2) Select Project Type : Hello World C++ Project.
3) Select Toolchains: MinGW GCC.

Click on Next,Next and Finish.
Now final step before build your hello world project.
Right Click on your project and click on Properties.

Goto Project > Properties > C/C++ Build > Settings > Tool Settings (Tab) > MinGW C++ Linker (Option) > Add Command (g++ -static-libgcc -static-libstdc++) (default command is only g++)

Right click on your project select Build Project option.
It will generate some output in console.
23:43:15 **** Rebuild of configuration Debug for project omtcppexample ****
Info: Internal Builder is used for build
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o “src\\omtcppexample.o” “..\\src\\omtcppexample.cpp”
g++ -static-libgcc -static-libstdc++ -o omtcppexample.exe “src\\omtcppexample.o”23:43:17 Build Finished (took 1s.596ms)
Again Right Click on your project and Run as > Local C/C++ Application.
Output :
!!!Hello World!!!
转:Configure your eclipse for C++的更多相关文章
- 创建jira插件
准备环境.安装SDK https://developer.atlassian.com/docs/getting-started/set-up-the-atlassian-plugin-sdk-and- ...
- Jetty学习四:部署到Jetty
转自:http://www.tuicool.com/articles/NrENjq Web应用的框架 标准Jetty发布版本能部署标准servlet Spec Web应用和Jetty内部Context ...
- Jetty:部署到Jetty
Web应用的框架 标准Jetty公布版本号能部署标准servlet Spec Web应用和Jetty内部ContextHandler部署描写叙述符,或者两者的一个混合. Web应用是可部署的动态(se ...
- jetty服务器数据源配置JNDI-Oracle,MySQL,SQLServer,DB2等 (转)
下载jetty 下载jetty服务器(8.1.0.RC2),解压到任意目录下 http://dist.codehaus.org/jetty/jetty-hightide-8.1.0/jetty-hig ...
- Tomcat启动分析(二)-自己编译Tomcat
为了方便分析Tomcat源码,利用大家习惯的方式来进行Debug调试,那么如何将Tomcat源码导入到Eclipse呢,这就是本文的重点 1 准备 1.1 获取Tomcat源码 获取tomcat源码有 ...
- 国产深度学习框架mindspore-1.3.0 gpu版本无法进行源码编译
官网地址: https://www.mindspore.cn/install 所有依赖环境 进行sudo make install 安装,最终报错: 错误记录信息: cat /tmp/mind ...
- Android Studio在导入eclipse的项目时一直卡在gradle:Configure project
学Java的时候用的是eclipse,写android代码的时候用了疯狂android讲义推荐的AS.在用AS的时候出了很多问题,比如我想从别人那里拷贝eclipse写的工程的时候就遇到了Gradle ...
- How to Configure Eclipse for Python --- 在eclipse中如何配置pydev
From: http://www.rose-hulman.edu/class/csse/resources/Eclipse/eclipse-python-configuration.htm Pytho ...
- 在 Linux 中使用 Eclipse 和 Gnu Autotools 管理 C/C++ 项目
在我该系列的之前的所有随笔中,都是采用 Linux 发行版自带的包管理工具(如 apt-get.yum 等)进行软件的安装和卸载,从来没有向大家展示使用源代码自行编译安装软件的方法.但是长期混迹于 U ...
随机推荐
- SharePoint 2013 搜索报错"Unable to retrieve topology component health. This may be because the admin component is not up and running"
环境描述 Windows 2012 R2,SharePoint 2013(没有sp1补丁),sql server 2012 错误描述 搜索服务正常,但是爬网一直在Crawling Full,但是爬不到 ...
- android加固系列—3.加固前先学会破解,静态修改so
[版权所有,转载请注明出处.出处:http://www.cnblogs.com/joey-hua/p/5138585.html] 项目jni的关键代码(项目地址见文章底部),获取当前程序的包名com. ...
- ios网络编程学习
//网络访问获取数据//定义一个UIWebView属性,用来展示数据 @property (strong, nonatomic) IBOutlet UIWebView *myWebView; //.. ...
- sleep() 和 wait() 的区别
好多面经上都出现了,有必要好好熟悉一下 区别: 1.wait() 可以指定时间,也可以不指定(等五分钟你进来,或者是不叫你一直等着):sleep()必须指定时间(不能一睡不起) 2.wait()是Ob ...
- 【代码笔记】iOS-scrollerView里多个tableView加搜索框
一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> #import "customCell.h&qu ...
- iOS-保存照片或者视频到自定义相薄中以及读取数据
声明:本文为本人原创作品~转载请注明出处~谢谢配合! 让TableView支持横屏的代码如下: //支持横屏 myTableView.autoresizingMask = UIViewAutoresi ...
- CSS Float 以及相关布局模式
float 取值 属性 值 描述 left 向左浮动 right 向右浮动 none 默认值 inherit 继承 看一个栗子 红色线框代表父元素 脱离文档流,其实也没有完全脱离,会被 ...
- Scrum敏捷项目管理精要
1. 简介: 敏捷项目管理在我们国家起步比较晚,成功运用的项目不多 百分之六十五的敏捷项目用户为scrum 2.互联网时代的特征,雷军的话: 专注,极致,口碑,快(敏捷项目开发就是要快速) 3.敏捷开 ...
- Linux下python安装升级详细步骤 | Python2 升级 Python3
Linux下python升级步骤 Python2 ->Python3 多数情况下,系统自动的Python版本是2.x 或者yum直接安装的也是2.x 但是,现在多数情况下建议使用3.x 那么如 ...
- What every programmer should know about memory 笔记
What every programmer should know about memory, Part 1(笔记) 每个程序员都应该了解的内存知识[第一部分] 2.商用硬件现状 现在硬件的 ...