Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 19:16 Go to next message
Kevin Blakley is currently offline Kevin BlakleyFriend
Messages: 3
Registered: February 2021
Junior Member
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 08:55 Go to previous message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
Registered: July 2009
Senior Member
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.


Cheers,

Joost
Previous Topic:Clear Console Screen output with QEMU and GDB
Next Topic:Graphics with C++
Goto Forum:
  


Current Time: Mon Dec 30 17:32:47 GMT 2024

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

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

Back to the top