문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 다음 판 | 이전 판 | ||
|
wiki:eclipse:cdt [2020/05/19 10:55] dhan 만듦 |
wiki:eclipse:cdt [2023/01/13 18:44] (현재) |
||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| ====== CDT ====== | ====== CDT ====== | ||
| <WRAP left notice 80%> | <WRAP left notice 80%> | ||
| - | * description : Eclipse에서 c, c++ 개발 방법 기술 | + | * description : Eclipse에서 c, cplusplus |
| * author | * author | ||
| * email : dhan@repia.com | * email : dhan@repia.com | ||
| * lastupdate | * lastupdate | ||
| </ | </ | ||
| + | |||
| <WRAP clear/> | <WRAP clear/> | ||
| + | |||
| + | ===== 설치 ===== | ||
| + | [[https:// | ||
| + | |||
| + | ===== 강좌 ===== | ||
| + | [[https:// | ||
| + | [[https:// | ||
| + | |||
| + | |||
| + | |||
| + | ===== Cross GCC vs Linux GCC(Native) ===== | ||
| + | 컴파일한 바이너리가 다른 곳에서도 사용 가능 | ||
| + | |||
| + | ===== C/Cplusplus 개발 ===== | ||
| + | ==== library 등록(pthread, | ||
| + | - Project -> Properties | ||
| + | - C/Cplusplus Build -> Settings | ||
| + | - Tool Settings -> GCC Linker -> Libraries | ||
| + | pthread, iconv 처럼 해야됨 \\ | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | ==== -fPIC 등록 ==== | ||
| + | - Project -> Properties | ||
| + | - C/Cplusplus Build -> Settings | ||
| + | - Tool Settings -> GCC Compiler -> Miscellaneous | ||
| + | - Position Independent Code (-fPIC) check!! | ||
| + | |||
| + | ==== Makefile 자동생성 ==== | ||
| + | - Project -> Properties | ||
| + | - C/Cplusplus Build | ||
| + | - Builder Settings -> Makefile generation | ||
| + | |||
| + | Generate Makefiles automatically 체크 후 Apply \\ | ||
| + | |||
| + | ==== 소스 폴더 지정 ==== | ||
| + | - Project -> Properties | ||
| + | - C/Cplusplus General -> Paths and Symbols | ||
| + | - Source Location | ||
| + | |||
| + | ==== 실행파일 종류 지정 ==== | ||
| + | - Project -> Properties | ||
| + | - C/Cplusplus Build -> Settings | ||
| + | - Build Artifact | ||
| + | |||
| + | Artifact Type: 선택박스에서 Executable | Shared Library | Static Library 중 하나 지정 \\ | ||
| + | |||
| + | ==== 출력파일 지정 ==== | ||
| + | - Project -> Properties | ||
| + | - C/Cplusplus General -> Paths and Symbols | ||
| + | - Output Location | ||
| + | |||
| + | ==== 코드 스타일 지정(Formatter) ===== | ||
| + | - Windows -> Preferences | ||
| + | - C/Cplusplus -> Code Style -> Formatter | ||
| + | - BSD/Allman 사용 | ||
| + | |||
| + | - Mouse right click -> Source -> Format 실행 | ||
| ===== Tip ===== | ===== Tip ===== | ||
| + | [[https:// | ||
| ===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
| 줄 14: | 줄 74: | ||
| ===== Ref ===== | ===== Ref ===== | ||
| - | {{tag> | + | {{tag> |