본문 바로가기

21F/IPC

IPC W0 practice

사실 IPC의 첫 workshop(이라 하지만 단순 기초 루틴)은 cpr에서 이미 다룬 적 있다.

앞으로 12주간 다음과 같은 작업 순서를 따라 워크샵을 제출할 예정.

 

1. to copy your source file to matrix using an SFTP client application like WinSCP

WinSCP SecureFileTransferProtocol로, 로컬 컴퓨터의 소스파일들을 리눅스 서버(매트릭스)로 전송해준다.

 

2. to connect to matrix using a secured shell (SSH) client like PuTTy

PuTTy같은 SSH은 보통 터미널 클라이언트의 형태를 띠고 있고,  이를 이용해서 리눅스 서버에 접속 가능하다.

그리고 WinSCP의 환경 설정을 통해 세션을 생성할 때 자동으로 PuTTy 터미널도 열리도록 할 수 있다.

 

3. to compile your code on matrix using the gcc compiler application

사실 여기서 말하는 gcc compiler application이 PuTTy를 말하는건지 아니면 그 안의 내장된 어떤 기능을 말하는건지 확실하지 않다.

 

따라서 앞으로의 작업 순서는

a. 비쥬얼 스튜디오를 이용해 소스코드를 만들고,

b. VPN을 켜고

c. WinSCP에 접속하여 매트릭스로 파일을 전송시킨다.

d. PuTTy가 함께 열리는데(PuTTy대신 윈도우즈에 내장된 cmd나 다른 SSH를 사용해도 무관하다) 이제 리눅스 커맨드를 사용하여 소스파일을 컴파일하고, 과제를 제출할 것이다.

 

 

 Notes : 항상 맨위에 내 정보 포함할 것.

/*
 Name: Your Name
 ID : ### ### ###
 Email : yourEmail@senecacollege.ca
 Section : NAA
 Date : Sep. 08, 2021
 Description : Practice submission
*/

The main function is an entry point to the application.

 

 

Compile your code: From the top menu bar, select Build -> Build Solution

- If there are errors, fix your errors and re-attempt building (keyboard shortcut: + + B)

    - If successful (bottom left corner status message), execute your program:

         From the top menu bar, select Debug -> Start without Debugging (keyboard shortcut: + F5)


 

 

 

WinSCP 접속 후 왼쪽의 내 home directory에서 오른쪽 matrix server로 drag and drop

 

Copy your source file(s) to matrix

       (copy only the w0test.c file – the other Visual Studio created files are not required on matrix)

Make note of the directory you copy the file to so you know where to navigate when you must submit your work

 


ls -l : show all files with detail

gcc -Wall w0test.c -o wtest

- gcc : actual compiler

- Wall : warning (if there're any warning(all type), don't allow to compile. give us scenarios)
- specify what source file I want to compile.

  This has to be exact, meaning your upper/lower case has to match the file exactly.
- o : output

 we want the executable binary file called wtest, and this is an application that you can actually run

 returning w0test(source code file) into an executable file called wtest

warning 옵션을 사용해서 w0test.c 파일을 wtest라는 이름의 파일로 컴파일해라

리눅스에는 컴파일러 따로 없으니 직접 컴파일 하는 법 알아야함..

 

정답이 다르면 제출이 불가능하다. 다음과 같이 에러가 어디서 어떻게 났는지 힌트를 준다.

수정을 위해

pico w0test.c
This is an editor that I use called pico on Linux

 

이제 제출만 하면 끝

 

yes까지 해줘야 제출이 완료되고 자동으로 메일이 온다.

 

'21F > IPC' 카테고리의 다른 글

Assignment1  (0) 2021.10.29
W7 IPC class2  (0) 2021.10.23
IPC W2 Class1  (0) 2021.09.14