Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » transfer CDT project from linux to windows(howto transfer project from linux to windows and vice versa)
transfer CDT project from linux to windows [message #758538] Wed, 23 November 2011 15:40 Go to next message
dupes  is currently offline dupes Friend
Messages: 4
Registered: November 2011
Junior Member
I'm trying to create a CDT project in Windows or Linux and transfer the project to the other OS. I'm able to create a project and make it compile on either platform, but I can't get intellisense to work on the second platform and I receive errors and warnings in the IDE. The IDE isn't able to find the system include files no matter how I modify the project settings, which creates a bunches of undefined errors and missing header file warnings.

A project transferred from Windows to Linux gives an 'invalid project path' error with a path pointing to '<project_dir>/Debug/include'. A project transferred from Linux to Windows gives an 'error launching external scanner' warning which seems to indicate a 'discovery options' setting problem, but I receive this warning no matter how I change the settings.

The only method I've come up with that solves all of these problems is to create project files for Linux and Windows but that's not an ideal solution. I'd like to do it with different build configurations. Is this possible?
Re: transfer CDT project from linux to windows [message #758693 is a reply to message #758538] Thu, 24 November 2011 09:41 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
If you use different build configurations for Linux and Windows you can select a different toolchain for each platform.

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: transfer CDT project from linux to windows [message #758733 is a reply to message #758693] Thu, 24 November 2011 12:26 Go to previous messageGo to next message
dupes  is currently offline dupes Friend
Messages: 4
Registered: November 2011
Junior Member
I should have clarified; I am creating different build configurations. The projects build on both platforms, but the IDE does not have the proper paths on the second platform so intellisense doesn't work and it shows a bunch of errors and warnings. For example, for the project started on Linux and transferred to Windows, I added a build configuration that uses the VS compiler. The program builds on Windows, but the IDE shows a bunch of errors and warnings. Part of the issue seems to point to the 'Discovery Options'. Changes made to 'Discovery Options' seem to be ignored.
Re: transfer CDT project from linux to windows [message #758905 is a reply to message #758733] Fri, 25 November 2011 07:46 Go to previous messageGo to next message
Michael  is currently offline Michael Friend
Messages: 10
Registered: November 2011
Junior Member
yes paths are not compatible...dooouuhh. Nothing but start project files from scratch.
Re: transfer CDT project from linux to windows [message #758986 is a reply to message #758905] Fri, 25 November 2011 13:38 Go to previous messageGo to next message
dupes  is currently offline dupes Friend
Messages: 4
Registered: November 2011
Junior Member
Is new project files currently the only solution? Anyone know if this is something slated to be fixed?

An example project is attached. I created the project in Linux, then copied to Windows and created a build configuration called Debug-Win using MSVC. If you launch eclipse from the VS command prompt and open the project, the project should compile, but the IDE will show a bunch of errors.
  • Attachment: cross_cdt.tgz
    (Size: 973.22KB, Downloaded 196 times)
Re: transfer CDT project from linux to windows [message #759287 is a reply to message #758986] Mon, 28 November 2011 09:39 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
To get code completion (intellisense) working you will need a different index for every build configuration. Open Project properties->C/C++ General->Indexer
Here you should select "Use active build configuration for the indexer" (at the bottom of the page). So when you switch from Linux to Windows build configuration (i.e. change the active build configuration) your index should be rebuild with the correct include paths and symbols.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: transfer CDT project from linux to windows [message #759376 is a reply to message #759287] Mon, 28 November 2011 13:55 Go to previous message
dupes  is currently offline dupes Friend
Messages: 4
Registered: November 2011
Junior Member
That fixes the issue. Thanks.
Previous Topic:How to build a project with "./configure && make"
Next Topic:C: semantic coloring broken
Goto Forum:
  


Current Time: Thu Apr 25 06:03:49 GMT 2024

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

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

Back to the top