Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse will only compile one file
Eclipse will only compile one file [message #1837926] Wed, 10 February 2021 14:16 Go to next message
Eclipse UserFriend
Ok, so I am new to coding and to using Eclipse. I have successfully built my first Hello World program. The problem is when I create a new program the compiler just compiles and runs the previous one. Why is it doing this? I admit that I don't yet understand how this IDE works. So if you take a look at the screen shot you will see the output of the hello world program and not the output of what I just tried to compile.
Re: Eclipse will only compile one file [message #1837943 is a reply to message #1837926] Thu, 11 February 2021 03:55 Go to previous message
Eclipse UserFriend
Hi,

I think that you use the "run" button on the toolbar? That is set to run the executable from your "Project1". And if that is not the project that contains the main from your screen dump it runs the wrong program.

From you screen dump I deduce that you are learning C++. What I say to my students is that they should create a new project for each assignment/exercise and that they should always close all other projects except the one they are working on, until they are familiar enough with Eclipse. It prevents them from editing the wrong source files, compiling the wrong project and running the wrong executable.
Previous Topic:Clear Console Screen output with QEMU and GDB
Next Topic:Graphics with C++
Goto Forum:
  


Current Time: Tue Jun 24 03:34:18 EDT 2025

Powered by FUDForum. Page generated in 0.03342 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top