eclipse instructions

9
1. Get the assignment stub 1. Download conditionals.zip 2. Copy conditionals.zip into the workspace folder of Eclipse 3. Right-click -> Extract Here 4. Delete conditionals.zip NOTE(path of uncompressed file) : ~/workspace/conditionals 2. Launch eclipse

Upload: independent

Post on 04-May-2023

2 views

Category:

Documents


0 download

TRANSCRIPT

1. Get the assignment stub1. Download conditionals.zip2. Copy conditionals.zip into the workspace folder of Eclipse 3. Right-click -> Extract Here4. Delete conditionals.zip

NOTE(path of uncompressed file) : ~/workspace/conditionals

2. Launch eclipse

3. Use the options File -> New Project -> C/C++ -> "Existing project with Makefile"

4. Give the location to the uncompressed folder (~/workspace/conditionals/ in this case)

Note :

1. Browse -> ~/workspace/conditionals

2. Linux GCC is the tool chain

The stub will open within Eclipse.

5. To run make with the various targets given in the makefile that comes with the stub, do the following 5.1 Double click on makefile in the project browser (left panel) 5.2 'makefile' will open 5.3 On the right pane titled "Outline", you will see a list of targets like 'all', 'build', 'run', 'tests', 'check', 'submit', 'submit.practice', and 'submit.grade'

5.4 Right-click on each target -> Add make target.Example : Click “all” -> Add make target. And in the window that appear have the following

settings. Please do this for ALL the targets i.e... all, build,run,clean.........

5.5 In the project explorer. Please right click on the project. Then make target -> Build

Example : In case of “all”

In the console we see :

**** Build of configuration Default for project conditionals ****make all g++ -o conditionals conditionals.cppBuild Finished (took 828ms)

More Examples:

1. Running the test-suiteIn case we want to run test cases our program. “make target -> Build -> Tests”, this runs pre-generated test cases.Make sure these are clean before submitting the assignment for final grading.

In the console we see :

**** Build of configuration Default for project conditionals ****make tests rm -f conditionals run.logg++ -o conditionals conditionals.cppRunning local test-suite

test2: FAILEDGiven input0xabcdef12Expected output: AND imm(243) 247 274Got output: test6: FAILEDGiven input0x57348953Expected output: SUB 461 339Got output: test1: FAILEDGiven input0x20040403Expected output: ADD 1 2 3Got output: test4: FAILEDGiven input0x98765432Expected output: DIV imm(29) 50Got output: test5: FAILEDGiven input0x65598720Expected output: MUL 342 195 288Got output: test3: FAILEDGiven input0x22345678Expected output: ADD 141 43 120Got output: test7: FAILEDGiven input0x43246563Expected output: SUB 201 50 355Got output: TESTS_PASSED: 0TESTS_FAILED: 7Finished running all test cases

Build Finished (took 834ms)

2. Doing a practice submission

In case we want to do a practice submission.

In the console we see :

**** Build of configuration Default for project conditionals ****make submit.practice rm -f conditionals run.logchecking required files for submissionAll files in placeRun 'make submit.practice' to get the ZIP file to upload for a practice run.Run 'make submit.grade' to get the ZIP file to upload for final submission.Generating ZIP file to upload adding: conditionals/ (stored 0%) adding: conditionals/.project (deflated 67%) adding: conditionals/conditionals.cpp (deflated 38%) adding: conditionals/.settings/ (stored 0%)Upload conditionals.zip to https://10.237.20.228:1345/OnlineEvaluation/default/submit for a practice run

Build Finished (took 212ms)

It mentions in the console the procedure to submit. For all future assigments please read the console for all instructions.

Conditionals.zip will appear in the project directory.From the properties window we can easily find the path of the file