Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Code compiles but different code is executed
Code compiles but different code is executed [message #1406335] Sat, 09 August 2014 19:01 Go to next message
Benedict Holland is currently offline Benedict HollandFriend
Messages: 1
Registered: August 2014
Junior Member
So I am not new to c++ programming but this has me thrown for a loop every single time. I make code changes to an existing Makefile project. I set up the project correctly. I then modify code in a shared library. It compiles and I debug the application so the application launches.

None of my code changes are hit. GDB recognizes the new lines of code but nothing I add is executed. For example, say there is a line such as:

DETAILED_MESSAGE("Read headers in " << dataFile) ;

which will print to the console:

[22:54:53]patModelSpec.cc:560 Read headers in /home/ben/Dropbox/Disertation/wtp_space/output_biogeme_test.dat

but when I change it to:

DETAILED_MESSAGE("Read headers in WIOEFJAOIWJEAFWAEI" << dataFile) ;

it will still only print
[22:54:53]patModelSpec.cc:560 Read headers in /home/ben/Dropbox/Disertation/wtp_space/output_biogeme_test.dat

That means to me that changes to an existing string are not recognized. I try to std::cout << "hello" << std::endl; and the debugger hits the code and does absolutely nothing.

I don't know why this is happening. The application builds. The code compiles. The debugger picks up the break points. The code gets hit. I see nothing changing when the application runs including all print statements and any code change I make. As a note though, if the syntax is wrong, it will underline it in red and say that "There was a problem, should I continue?" and regardless of how I answer, the same thing happens.

Can anyone please tell me what is going on? I really would love the help.

~Ben
Re: Code compiles but different code is executed [message #1413398 is a reply to message #1406335] Thu, 28 August 2014 12:36 Go to previous message
Con Cunningham is currently offline Con CunninghamFriend
Messages: 2
Registered: August 2014
Junior Member
I'm not sure if I can help Ben, but just so I understand, do you have 1 or multiple C++ projects in Eclipse? Are you modifying them outside Eclipse? I've seen something like this before where the project needed to be refreshed in eclipse to get the source in-sync with the object code.
Previous Topic:Eclipse for C on Mac
Next Topic:Custom Tool Chain for IBM Visual Age C/C++
Goto Forum:
  


Current Time: Fri Apr 26 17:57:20 GMT 2024

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

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

Back to the top