转: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 ...
随机推荐
- openssh/ntp/ftp漏洞
这3种漏洞常规加固都要对应操作系统打官方漏洞升级包.既然这么说那下面就是不常规的: Openssh: 改ssh版本:whereis ssh //查看ssh目录cd 到该目录cp ssh ssh.bak ...
- 【iOS】使用CoreText实现图文混排
iOS没有现成的支持图文混排的控件,而要用多个基础控件组合拼成图文混排这样复杂的排版,是件很苦逼的事情.对此的解决方案有使用CoreText进行绘制,或者使用TextKit.本文主要讲解对于CoreT ...
- oc程序编译【-framework Foundation 编译】
第一种编译 第二种编译 -framework Foundation 编译
- 【代码笔记】iOS-看图听故事
一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> #import <AVFoundation/AVFo ...
- GCD中的dispatch_group函数的详解
<一>引入dispatch_group函数的目的 在追加到dispatch_Queue中的多个处理全部结束后想要执行结束的处理,这种需求经常会在我们的程序中出现 (第一种情况)只使用一个S ...
- Play Framework 第一个应用
熟悉的Hello World 新创建一个工程,了解下重要文件的结构 .\app controllers\models\views 目前比较流行的MVC架构 .\conf application.con ...
- AngularJS 指令
AngularJS 指令 AngularJS 指令是扩展的 HTML 属性,带有前缀 ng-. ng-app 指令 ng-app 指令定义了 AngularJS 应用程序的 根元素. ng-app 指 ...
- 安装centos 7后恢复windows 2008R2 (Windows7)启动项
安装CentOS 7,安装之后发现Win2008R2的启动项不见了(Windows7同理).一般安装Linux过程中会自动识别windows系统并添加引导项,centos的问题在于默认不支持ntfs分 ...
- 谈谈yii2-gii如何自定义模板
作者:白狼 出处:http://www.manks.top/article/yii2_gii_custom_template本文版权归作者,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位 ...
- Git从零教你入门(4):Git服务之 gogs部署安装
Git从零入门系列4: 先看上一篇文章: http://www.51testing.com/index.php?uid-497177-action-viewspace-itemid-3706817 今 ...