Difference between revisions of "C 프로젝트 설정하기"

From AtlasWiki
Jump to: navigation, search
 
(6 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
#프로젝트가 Makefile이 있는 경우에 불러오기:
 
#프로젝트가 Makefile이 있는 경우에 불러오기:
 
#*패키지 익스플로러에서 마우스 오른쪽 클릭하십시오.
 
#*패키지 익스플로러에서 마우스 오른쪽 클릭하십시오.
#*'''불러오기를(Import)'''선택하십시오.
+
#*'''불러오기를(Import)''' 선택하십시오.
#*팝업 대화창에서 '''C/C++'''를 펼쳐 '''기존 코드를 Makefile 프로젝트로(Existing Code as Makefile Project)'''’를 선택한 후 '''다음을(Next)'''클릭하십시오.
+
#*팝업 대화창에서 '''C/C++'''를 펼쳐 '''기존 코드를 Makefile 프로젝트로(Existing Code as Makefile Project)'''선택한 후 '''다음을(Next)''' 클릭하십시오.
 
#*프로젝트 이름을 입력한 후 불러올 디렉토리를 지정하십시오.
 
#*프로젝트 이름을 입력한 후 불러올 디렉토리를 지정하십시오.
#*'''완료를(Finish)'''클릭하십시오.
+
#*'''완료를(Finish)''' 클릭하십시오.
 
#프로젝트가 Makefile이 없는 경우에 불러오기:
 
#프로젝트가 Makefile이 없는 경우에 불러오기:
 
#*패키지 익스플로러에서 마우스 오른쪽 클릭하십시오.
 
#*패키지 익스플로러에서 마우스 오른쪽 클릭하십시오.
#*'''신규 > 프로젝트를(New > Project)'''선택하십시오.
+
#*'''신규 > 프로젝트를(New > Project)''' 선택하십시오.
#*In the popup dialogue, select '''General > Project''' and click '''Next'''.
+
#*팝업 대화창에서 '''일반 > 프로젝트를(General > Project)''' 선택하고 '''다음을(Next)''' 클릭하십시오.
#*Enter a project name and click '''Finish'''.
+
#*프로젝트 이름을 입력하고 '''완료를(Finish)''' 클릭하십시오.
#*Right-click on the project and select '''Import'''.
+
#*프로젝트에 마우스 오른쪽 클릭하고 '''불러오기를(Import)''' 선택하십시오.
#*Enter the parent directory, select files to import, and click '''Finish'''.
+
#*상위 디렉토리를 입력하고 불러올 파일을 선택한 후 '''완료를(Finish)''' 클릭하십시오.
  
 
<br>
 
<br>
<u>Advanced Set up for C projects</u>
+
<u>C 프로젝트 고급 설정하기</u>
 
<br>
 
<br>
  
'''For a typical C project, no further setup is necessary.''' However, large projects like the Linux kernel have a complicated build system that Atlas must understand in order to map the code correctly. To do this Atlas will analyze the build commands used to build the project. The steps below detail the changes necessary to map only the files built by the make file.
+
'''일반 C 프로젝트는 추가적인 설정이 필요하지 않습니다.''' 하지만 Linux 커널과 같이 대규모 프로젝트의 경우 Atlas가 코드를 정확히 매핑할 수 있게 하려면 Atlas가 복잡한 빌드 시스템을 이해할 수 있게 해야 합니다. 그러기 위해서 Atlas가 프로젝트 빌드에 사용된 빌드 명령어를 분석할 것입니다. 아래의 절차는 make file로 빌드된 파일만 매핑할 때 필요한 변경 사항을 자세하게 설명합니다.
  
#Add the compiler build command:
+
#컴파일러 빌드 명령어를 추가하기:
#* Right-click on the project in the package explorer and select '''Properties'''.
+
#*패키지 익스플로러에서 프로젝트를 마우스 오른쪽 클릭한 후 '''속성을(Properties)''' 선택하십시오.
#* Under '''Atlas C/C++ Build''', add the name of the compiler used by the project to the '''Build Commands'''. Atlas will look for commands sent to these compilers when parsing the output of the project's makefile.
+
#*'''Atlas C/C++ 빌드(Build)''' 아래의 '''빌드 명령어에(Build Commands)''' 프로젝트에 사용되는 컴파일러 이름을 추가하십시오. Atlas가 해당 컴파일러에 전송된 명령어를 확인하고 프로젝트의 makefile 출력을 분석합니다.
#* Click '''OK'''.
+
#*'''확인을(OK)''' 클릭하십시오.
# Use information from build commands
+
#빌드 명령어 정보 사용하기
#* Right-click on the project in the package explorer and select '''Properties'''.
+
#*패키지 익스플로러에서 프로젝트를 마우스 오른쪽 클릭한 후 '''속성을(Properties)''' 선택하십시오.
#* Select '''Map only files in current build''' under '''Source files to map'''.
+
#*'''매핑할 소스 파일 선택(Source files to map)''' 아래에서 '''현재 빌드에 있는 파일만 매핑하기(Map only files in current build)'''를 선택하십시오.
#* Select '''Use discovered configuration for files in the current build''' under '''File configuration'''.
+
#*'''파일 설정(File Settings)''' 아래에서 '''현재 빌드의 파일에 확인된 설정 사용(Use discovered configuration for files in the current build)'''을 선택하십시오.
#* Click '''OK'''.
+
#*'''확인을(OK)''' 클릭하십시오.
  
 
<br>
 
<br>
<u>Troubleshooting</u>: If Atlas is unable to properly map the project, try the following fixes:
+
<u>문제 해결</u>: Atlas가 프로젝트를 제대로 매핑하지 못한다면 다음 방법을 시도해 보십시오:
 
<br>
 
<br>
  
#Clean and build the project and make sure the build output is being correctly parsed:
+
#프로젝트를 정리하여 빌드하고 빌드 출력이 정확히 분석되었는지 확인하기:
#*Right-click on the project in the package explorer and select '''Properties'''.
+
#*패키지 익스플로러에서 프로젝트를 마우스 오른쪽 클릭한 후 '''속성을(Properties)''' 선택하십시오.
#*Look under Atlas '''C/C++ Build > Build Configuration File'''.
+
#*'''Atlas C/C++ 빌드 > 빌드 설정 파일을(Atlas C/C++ Build > Build Configuration File)''' 확인하십시오.
#*If the Open button under Build Configuration File is grayed out, or if it says zero files were found, then Atlas was unable to detect the build configuration. Select '''C/C++ Build''' and uncheck “Use default build command”.
+
#*'''빌드 설정 파일(Build Configuration File)''' 밑의 '''열기(Open)''' 버튼이 회색이거나, 파일을 찾을 수 없었다고 나오면 Atlas가 빌드 설정을 감지하지 못한 것입니다. '''C/C++ 빌드를(Build)''' 선택하고 ‘기본 빌드 명령어 사용(Use default build command)’의 체크를 해제하십시오.
#*Adjust the command to make the output verbose. Necessary flags may vary; common options include “V=1” or “VERBOSE=1”.
+
#*출력 verbose를 만들려면 명령어를 조정하십시오. 필요한 플래그는 상황에 따라 다릅니다. 일반적으로 ‘V=1’나 ‘VERBOSE=1’이 사용됩니다.
#*Clean and build the project and check that Build Configuration File is nonzero.
+
#*프로젝트를 정리하고 빌드하여 '''빌드 설정 파일이(Build Configuration File)''' 0개가 아닌지 확인하십시오.
#If Atlas’ code map is still empty, it may be that the Makefile is improperly reporting changing directories.
+
#Atlas 코드 맵이 아직도 빈 상태라면 Makefile이 변경된 디렉토리를 적절히 보고하지 못한 것일 수 있습니다.
#*Right-click on the project in the package explorer and select '''Properties'''.
+
#*패키지 익스플로러에서 프로젝트를 마우스 오른쪽 클릭한 후 '''속성을(Properties)''' 선택하십시오.
#*Select '''C/C++ Build''' and uncheck “Use default build command”.
+
#*'''C/C++ 빌드를(Build)''' 선택하고 ‘기본 빌드 명령어 사용(Use default build command)’의 체크를 해제하십시오.
#*Add the flag “--print-directory”.
+
#*--Print-directory’ 플래그를 추가하십시오.
#*Clean and build the project.
+
#*프로젝트를 정리하고 빌드하십시오.
  
 
<br>
 
<br>
For versions of Atlas before Atlas 3.0, see the set up instructions at [[Configuring C Projects for Atlas 2.0]].
+
Atlas 3.0 이전 버전의 Atlas의 경우는 [[Atlas 2.0용 C 프로젝트 설정]] 방법을 확인하십시오.
  
 
<br>
 
<br>
If you experience difficulty in setting up Atlas, please contact [mailto:[email protected] [email protected]] for assistance.
+
Atlas 설정에 어려움을 겪고 계시다면 [mailto:[email protected] [email protected]]에 지원을 요청하십시오.

Latest revision as of 15:42, 18 May 2017

아래의 절차는 기존 C 코드 베이스를 Eclipse 프로젝트로 불러오는 방법과 Linux 커널과 같은 대규모 C 프로젝트의 경우 필요한 고급 프로젝트 설정 방법을 자세히 설명한 것입니다.


Eclipse에서 C 프로젝트 불러오기

  1. 프로젝트가 Makefile이 있는 경우에 불러오기:
    • 패키지 익스플로러에서 마우스 오른쪽 클릭하십시오.
    • 불러오기를(Import) 선택하십시오.
    • 팝업 대화창에서 C/C++를 펼쳐 기존 코드를 Makefile 프로젝트로(Existing Code as Makefile Project)를 선택한 후 다음을(Next) 클릭하십시오.
    • 프로젝트 이름을 입력한 후 불러올 디렉토리를 지정하십시오.
    • 완료를(Finish) 클릭하십시오.
  2. 프로젝트가 Makefile이 없는 경우에 불러오기:
    • 패키지 익스플로러에서 마우스 오른쪽 클릭하십시오.
    • 신규 > 프로젝트를(New > Project) 선택하십시오.
    • 팝업 대화창에서 일반 > 프로젝트를(General > Project) 선택하고 다음을(Next) 클릭하십시오.
    • 프로젝트 이름을 입력하고 완료를(Finish) 클릭하십시오.
    • 프로젝트에 마우스 오른쪽 클릭하고 불러오기를(Import) 선택하십시오.
    • 상위 디렉토리를 입력하고 불러올 파일을 선택한 후 완료를(Finish) 클릭하십시오.


C 프로젝트 고급 설정하기

일반 C 프로젝트는 추가적인 설정이 필요하지 않습니다. 하지만 Linux 커널과 같이 대규모 프로젝트의 경우 Atlas가 코드를 정확히 매핑할 수 있게 하려면 Atlas가 복잡한 빌드 시스템을 이해할 수 있게 해야 합니다. 그러기 위해서 Atlas가 프로젝트 빌드에 사용된 빌드 명령어를 분석할 것입니다. 아래의 절차는 make file로 빌드된 파일만 매핑할 때 필요한 변경 사항을 자세하게 설명합니다.

  1. 컴파일러 빌드 명령어를 추가하기:
    • 패키지 익스플로러에서 프로젝트를 마우스 오른쪽 클릭한 후 속성을(Properties) 선택하십시오.
    • Atlas C/C++ 빌드(Build) 아래의 빌드 명령어에(Build Commands) 프로젝트에 사용되는 컴파일러 이름을 추가하십시오. Atlas가 해당 컴파일러에 전송된 명령어를 확인하고 프로젝트의 makefile 출력을 분석합니다.
    • 확인을(OK) 클릭하십시오.
  2. 빌드 명령어 정보 사용하기
    • 패키지 익스플로러에서 프로젝트를 마우스 오른쪽 클릭한 후 속성을(Properties) 선택하십시오.
    • 매핑할 소스 파일 선택(Source files to map) 아래에서 현재 빌드에 있는 파일만 매핑하기(Map only files in current build)를 선택하십시오.
    • 파일 설정(File Settings) 아래에서 현재 빌드의 파일에 확인된 설정 사용(Use discovered configuration for files in the current build)을 선택하십시오.
    • 확인을(OK) 클릭하십시오.


문제 해결: Atlas가 프로젝트를 제대로 매핑하지 못한다면 다음 방법을 시도해 보십시오:

  1. 프로젝트를 정리하여 빌드하고 빌드 출력이 정확히 분석되었는지 확인하기:
    • 패키지 익스플로러에서 프로젝트를 마우스 오른쪽 클릭한 후 속성을(Properties) 선택하십시오.
    • Atlas C/C++ 빌드 > 빌드 설정 파일을(Atlas C/C++ Build > Build Configuration File) 확인하십시오.
    • 빌드 설정 파일(Build Configuration File) 밑의 열기(Open) 버튼이 회색이거나, 파일을 찾을 수 없었다고 나오면 Atlas가 빌드 설정을 감지하지 못한 것입니다. C/C++ 빌드를(Build) 선택하고 ‘기본 빌드 명령어 사용(Use default build command)’의 체크를 해제하십시오.
    • 출력 verbose를 만들려면 명령어를 조정하십시오. 필요한 플래그는 상황에 따라 다릅니다. 일반적으로 ‘V=1’나 ‘VERBOSE=1’이 사용됩니다.
    • 프로젝트를 정리하고 빌드하여 빌드 설정 파일이(Build Configuration File) 0개가 아닌지 확인하십시오.
  2. Atlas 코드 맵이 아직도 빈 상태라면 Makefile이 변경된 디렉토리를 적절히 보고하지 못한 것일 수 있습니다.
    • 패키지 익스플로러에서 프로젝트를 마우스 오른쪽 클릭한 후 속성을(Properties) 선택하십시오.
    • C/C++ 빌드를(Build) 선택하고 ‘기본 빌드 명령어 사용(Use default build command)’의 체크를 해제하십시오.
    • ‘--Print-directory’ 플래그를 추가하십시오.
    • 프로젝트를 정리하고 빌드하십시오.


Atlas 3.0 이전 버전의 Atlas의 경우는 Atlas 2.0용 C 프로젝트 설정 방법을 확인하십시오.


Atlas 설정에 어려움을 겪고 계시다면 [email protected]에 지원을 요청하십시오.