카테고리

asm (27) bootloader_x86_grub (1) C (92) compile (11) config (76) CPP (13) CSS (1) debugging (7) gimp (1) Go (1) html (1) Java (1) JavaScript (1) kernel (19) LibreOffice (3) Linux system progamming (21) MFC (1) opencv (4) OpenGL (1) PHP (1) Python (4) qemu (29) shell (3) socket (7) troubleshooting (2) ubuntu18.04 (2) windows (1)

2018/12/05

ubuntu 18.04 cdt eclipse Project create and Compile

프로젝트 생성.
File -> c/C++ Project -> C++ Managed Build
Projectname:Cpp01

선택
Project type:
HelloWorldC++ Project

Toolchains:
Linux GCC

Next 클릭
Author : Jang

Finish 버튼 클릭

Next 클릭
Configurations:
Debug
Release
체크

Finsh 클릭

Debug Compile
1. 프로젝트 빌드
Project -> Build Project 또는 Build All
단축키: Ctrl + B

1.1 C++ Managed Build 빌드 설정 위치
Window-> Preferences
C/C++ -> Build -> Environment

1.2 Makefile Project
Window-> Preferences
C/C++ -> Makefile Pages settings

2. 실행
Run -> Run
단축키 : Ctrl + F11

2.1 Launch failed. Binary not found.
바이너리 파일 경로 설정
Run -> Run Configurations
C/C++ Application

Project: Cpp01
C/C++Application:
Debug/Cpp01 ---> 경로 설정 Browse 클릭
Apply
Run

Console 창
!!!Hello World!!!

Release Compile
1. Project -> Build Configuration -> Set Active -> Release 선택
2. 프로젝트 빌드
Project -> Build Project 또는 Build All
단축키: Ctrl + B

3. Run -> Run
단축키 : Ctrl + F11

터미널 실행 방법
1. 소스 위치 확인 방법
화면 구성 왼쪽 창 마우수 좌표 이동
Cpp01 오른쪽 마우스 클릭 -> Properties 선택
Location: 프로젝트 경로 드래그 복사

2. 터미널 실행 ctrl + art + t
cd ~/eclipse-workspace/Cpp01/Debug
./Cpp01

cd ~/eclipse-workspace/Cpp01/Release
./Cpp01

댓글 없음:

댓글 쓰기