Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » old project (Ganymede) open with eclipse Neon(impose include repository order on (auto) makefile)
old project (Ganymede) open with eclipse Neon [message #1751575] Wed, 11 January 2017 15:48 Go to next message
Regis SEB is currently offline Regis SEBFriend
Messages: 3
Registered: January 2017
Junior Member
Hi all,

I open an old c project made with Ganymede (CDT 5.0.0) with an eclipse Neon (CDT 9.2.0). I try this for lots of reasons, but especially because I want to use GIT, and it's not available on eclipse 3.4...

In both case, I use the same GCC version (4.1.1) .

I'm on Windows 7, 64 bit.

When I open for the first the project with eclipse neon, it say that the "workspace was written with an older version... Are you sure you want to continue..." I click on Ok, that seem legit.
Everythink seem ok (I compare every project properties with the old eclipse), it compile, but the executable is not the same.
For quality control reason (it's a project for my compagny), I can't just say "it's not the same executable, but i swear, it work like before..."

The makefile generated (automatically made by eclipse) is very similare between Ganymede and Neon exepted the include directory order!

Just for test, I disable "Properties->C/C++ Build->Build Settings -> Makefile generation->Generate Makefiles automatically", edit the makefile to have the same include directory order, like the makefile in the old project, I compile and the executable match!

With the "generate Makefiles automatically" activate, I try to change the
"Properties-> C/C++ Build->Settings->Tool Settings->Include->include paths" orders, but nothing change on the makefile...

I don't know how precisely the "generation Makefiles automatically" work,but I think it used, on the old eclipse/CDT the "discovery option" (depreciated) and on the the new eclipse/CDT the "Preprocessor Include Paths". But the order of the include paths define are not considered...

So, the question is:

Does anybody know how to impose the include directory order on the makefile? (exepted to make myself the makefile...)

I already spend lot of time with this, so please, help!!!

Thanks!


Re: old project (Ganymede) open with eclipse Neon [message #1751622 is a reply to message #1751575] Wed, 11 January 2017 23:10 Go to previous messageGo to next message
David VavraFriend
Messages: 1412
Registered: October 2012
Senior Member
Changing the include order can affect the order of functions depending on how they are defined.
Changing the order of the objects in the link will also do this.
As would changing the order of external libraries in the link.

It you still have the makefile generated by Ganymede, you can try using it to build by running make in a command window. Then check that the executable is identical. If it's not, then you'll have to do more sophisticated comparisons.

As for include order, it's possible the makefile isn't being recreated. Check the modification dates.
When you change the Settings, the makefile normally isn't changed until the next build.
If you delete the configuration directories (Debug, Default, Release, etc.) then rebuild.
Neon will recreate them. The include order should then be what is in the Settings dialogs.




[Updated on: Thu, 12 January 2017 08:15]

Report message to a moderator

Re: old project (Ganymede) open with eclipse Neon [message #1751683 is a reply to message #1751622] Thu, 12 January 2017 13:17 Go to previous messageGo to next message
Regis SEB is currently offline Regis SEBFriend
Messages: 3
Registered: January 2017
Junior Member
thanks for your answer!

I'm totally agree, if the include directories order on the makefile change, the executable change.

I have try to use my ganymede makefile on my "new" project Neon, and yes I have the same executable . The executable compile with ganymede, and the executable of the new project (with my old makefile) directly with a make command are the same.

The makefile on the Neon project is recreate (I check the date) and i also try :
- to delete manually just the makefile (and every .mk file on subdirectories)
- to delete the Release folder
Every files have been recreated (when i compile), but the makefile stay on the wrong order...

Is it possible that a hidden "discovery Options" settings (set on the old project, not show by eclipse Neon, but still used) make this trouble?

I also change the include paths order on Properties->C/C++ Build -> Settings->includes, the makefile is recreated (I remove it manually) but the order stay the same!

It looks like Eclipse Neon doesn't care about that...Even if I disable the "Automated discovery of paths and symbols" on discovery options.

Re: old project (Ganymede) open with eclipse Neon [message #1751696 is a reply to message #1751683] Thu, 12 January 2017 15:55 Go to previous messageGo to next message
David VavraFriend
Messages: 1412
Registered: October 2012
Senior Member
I suppose it's possible something has been left over.
Clean the project before deleting the Release folder.
Try clearing the discovery entries using the Clear button on Project --> C/C++ --> Discovery Options
Try creating another project from scratch and set the paths using only the Settings dialogs.
Check the Includes tab at Project --> C/C++ General --> Paths and Symbols.

All I can say is that changing the include order in Settings works for me.
The include order is important for ensuring proper headers are included.
Executable order is less important.

You may have uncovered a bug.


Re: old project (Ganymede) open with eclipse Neon [message #1751981 is a reply to message #1751696] Tue, 17 January 2017 13:58 Go to previous message
Regis SEB is currently offline Regis SEBFriend
Messages: 3
Registered: January 2017
Junior Member
Well, I try all what you say, but it didn't fixe the problem...

But I found what was wrong!

I have a strange folder architecture on my src.

I have a folder (Folder1) that contain *.c and *.h files, and an other folder (folder2), that contain some other *.c and *.h files.

Well it seem that old eclipse first link the files on "folder2", and after file contain by Folder1.
New Eclispe first link files on Folder1 and after file on folder2...
Solution was :
to create a "AFolder2" (take care of the uppercase and a letter before the F) on the src
drag an drop "folder2" on "Afolder2"
-change include path on Properties...

So simple, when you know it... I hope it will help someone, someday!

Thanks you for your help David!

This post is resolved!

Previous Topic:Undefined Reference to ' ' error (Linux Ubuntu)
Next Topic:Help with #include
Goto Forum:
  


Current Time: Wed Jan 19 11:48:01 GMT 2022

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

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

Back to the top