1 / 15

Linux Compile

Linux Compile. 목차. Vi 편집기 GCC 컴파일러 FTP 업로드. Vi 편집기 (Vi Editor). Vi 편집기 Visual editor 에서 유래 Linux/Unix 상에서 가장 널리 쓰이는 편집기. Vi 편집기 (Vi Editor). Vi 모드. Vi 편집기 (Vi Editor). Vi 실행방법. Vi 편집기 (Vi Editor). Hello Vi! 작성해보기 Insert, i , I 키를 눌려 입력모드로 들어가서 입력.

tammy
Download Presentation

Linux Compile

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux Compile

  2. 목차 • Vi 편집기 • GCC 컴파일러 • FTP 업로드

  3. Vi 편집기 (Vi Editor) • Vi 편집기 • Visual editor 에서 유래 • Linux/Unix 상에서 가장 널리 쓰이는 편집기

  4. Vi 편집기 (Vi Editor) • Vi 모드

  5. Vi 편집기 (Vi Editor) • Vi 실행방법

  6. Vi 편집기 (Vi Editor) • Hello Vi! 작성해보기 • Insert, i, I 키를 눌려 입력모드로 들어가서 입력

  7. Vi 편집기 (Vi Editor) • 저장하기 • ESC 키를 눌려 편집모드로 들어가 “:” 입력 • :w ‘파일이름’

  8. Vi 편집기 (Vi Editor) • 종료하기 • 편집모드에서 :q 입력 • :wq – 저장 후 종료 • :q! – 저장하지 않고 종료

  9. Vi 편집기 (Vi Editor) • 유용한 기능들 • v - 블록 설정하기 • y, d, p - 복사, 잘라내기, 붙여넣기 • dd - 행 삭제 • ‘ . ’ - 마지막 명령 되풀이 • ‘ / ‘ - 찾기 • :set nu – 행 번호 표시 • :(시작줄),(끝줄)s/찾을패턴/바꿀스트링/옵션 - 시작줄과 끝줄: ‘ . ‘은 현재행, ‘ $ ‘ 마지막 행을 의미,‘%’ 사용시 전체범위 • 옵션 : g(global), i(ignore case), c(confirm)

  10. GCC 컴파일러 • gcc(Gnu C compiler) 컴파일러 • GNU 프로젝트에 의해 만들어진 C 컴파일러 • 매우 단순, 콘솔에서 컴파일에 필요한 모든 명령 입력 • 어떠한 환경에서도 구동 가능 • CC –Unix에서 사용하는 C Compiler • GCC – Linux에서 사용하는 C Compiler

  11. GCC 컴파일러 • C program compile 해보기 • Vi를 사용하여 간단한 C Program 작성 • hello.c로 저장 • 컴파일 명령어 • gcchello.c • a.out실행 파일이 생성 됨 • ./a.out

  12. GCC 컴파일러 • C program compile 해보기 • a.out대신 실행프로그램 이름 정하기 • gcchello.c –o “실행프로그램이름” • gcc –o “실행프로그램이름” hello.c

  13. FTP 업로드 • Windows -> Linux 파일 업로드 • Window에서 소스 작성 • FTP 프로그램 실행 • 알FTP, FileZilla, winscp 등 • sinsi.pusan.ac.kr , port22(sftp에 해당하는 port 번호)접속 • FileZilla - http://filezilla-project.org/download.php?type=client

  14. FTP 업로드 • Windows -> Linux 파일 업로드 • Ex) FileZilla 작성한 소스 파일을 오른쪽의 자신의 리눅스 계정 홈 디렉토리로 전송

  15. FTP 업로드 • Windows -> Linux 파일 업로드 • Linux 상에서 확인

More Related