0% found this document useful (0 votes)
8 views4 pages

Mon Problems While Using Eclipse IDE

1. Common problems when using the Eclipse IDE include forgetting to save files before building, using incorrect file extensions like .C instead of .c, and building a project while its executable is still running. 2. Specific issues that may occur involve scanf not reading input as expected if no space is left before %c, and print messages not displaying before scanf without flushing stdout or disabling buffering. 3. The document provides solutions like adding fflush(stdout) or setvbuf calls to flush buffers and allow printing before scanning, and using Terminate in the Eclipse console to stop a running executable before rebuilding.

Uploaded by

Mohamed Alaa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

Mon Problems While Using Eclipse IDE

1. Common problems when using the Eclipse IDE include forgetting to save files before building, using incorrect file extensions like .C instead of .c, and building a project while its executable is still running. 2. Specific issues that may occur involve scanf not reading input as expected if no space is left before %c, and print messages not displaying before scanf without flushing stdout or disabling buffering. 3. The document provides solutions like adding fflush(stdout) or setvbuf calls to flush buffers and allow printing before scanning, and using Terminate in the Eclipse console to stop a running executable before rebuilding.

Uploaded by

Mohamed Alaa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Common Problems

While Using Eclipse IDE


Engineer / Mohamed Tarek
Notes and Problems
1. Make sure you saved your project files before build the code, because if you do not the
tool will build last saved version and will not see your new code changes.
a. Save the file by pressing CTRL + S
b. If the file is not saved you will find * beside the file name like the below photo.

2. Do not add space or any special character in the file or project name. file or project
name should use only capital & small letters, digits and underscore. Violate this may
generate a build error.

3. Files extensions in c language should be .c or .h in small letters NOT capital letters (.C or
.H) are not correct extensions. C compilers are building files with .c or .h formats only.

4. If you are taking an input character from the console through scanf. Make sure you left
a space before %c to prevent scanf function from taking new line or enter from the
previous printf or scanf functions.
scanf(“ %c”,&input);

1|Page
5. Do not Build a project while its executable is running. You will face the below error
“cannot open output file Exercise.exe: Permission denied”.
a. That’s happened because you cannot build & generate a new executable
file(.exe) to replace the old executable file while the old executable file is still
running!
b. To fix it you need to stop or kill the running executable.
i. Click on arrow beside the “Display Selected Console” in eclipse console.

ii. Select the running executable.

iii. click on the Terminate button.

iv. Build the project again and the error message will be disappeared.

2|Page
6. For printing messages before scanf in eclipse terminal you need to use one of the below
two solutions:
a. Add this line wherever you need to print the buffered messages.
fflush(stdout);
b. Or write these two lines only one time at the beginning of the main function
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);

Thank You & Good Luck


Engineer / Mohamed Tarek
3|Page

You might also like