eclipes CDT : Creating a simple Standard C++ Project -- "Hello World on a Windows Platform"
来源:互联网 发布:python 遗传算法库 编辑:程序博客网 时间:2024/05/17 03:37
Creating a simple Standard C++ Project -- "Hello World on a Windows Platform"
This section will use an example to create the familiar "Hello World!" C++ program. First, ensure that you have the CDT installed within Eclipse, as described above. Open a C/C++ Perspective and complete the following steps:
- In the C/C++ Projects View right click and select "New Project ..."
- Select "C++" in the left pane and the select "Standard Make C++ Project"
- Enter a name for the new project and select Finish. Note: you can determine the "Build Settings" from this dialog, but we will do so later, in the build section.
- In the C/C++ Projects View right click and select "New" > "Simple" > "File". Name your file hello.cpp
- Repeat the previous step and name the second new file "makefile".
- Copy the following text into the "hello.cpp" file:
#include <stdio.h>
int main()
{
printf("Hello World/n");
//block until user types something
fgetc(stdin);
return 0;
}Now, save the file.
- Copy the following text into the "makefile" file:
Remember that makefile requires that indented lines use a <tab> character and not spaces
hello.exe : hello.o
g++ -o hello.exe hello.o
hello.o : hello.cpp
g++ -c hello.cpp
all : hello.exe
clean :
-rm hello.exe hello.o
Now, save the file.
- eclipes CDT : Creating a simple Standard C++ Project -- "Hello World on a Windows Platform"
- a simple hello world nginx module
- To find a job on hello world~
- Creating a New Project
- Creating a simple web prototype based on CppCMS
- Tk GUI toolkit: A Simple Hello World Program
- Creating a Simple Direct2D Application
- A simple REST framework on C/C++
- Creating a Project –节译
- Creating a new Storm project
- Creating a ContextMenu on a ListView
- Creating a View on a Dialog
- Creating a Simple Win32 Service in C++
- Creating a Simple Win32 Service in C++
- Creating a Simple BSP Application Using AJAX
- Creating a Simple 1D Noise
- Creating a Simple 2D Noise
- Standard C/C++ on Windows
- 设计一个计算器 完成两个数字的加减乘除
- [Color]深入学习YUV色彩模型 V1.1
- Test
- 郁闷的5月
- CppUnit快速入门
- eclipes CDT : Creating a simple Standard C++ Project -- "Hello World on a Windows Platform"
- 最经典的寓言 - 乌鸦和兔子
- C语言教程---第一章: C语言概论
- 最经典的寓言 - 火鸡和公牛
- C语言教程---第二章: 数据类型、运算符、表达式
- C语言教程---第三章: C语言程序设计初步
- 最经典的寓言 - 牛粪中的小鸟
- C语言教程---第四章: 数组
- C语言教程---第五章:函数