Skip to main content



      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 10:40 Go to next message
Eclipse UserFriend
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 04:41 Go to previous messageGo to next message
Eclipse UserFriend
If you use different build configurations for Linux and Windows you can select a different toolchain for each platform.
Re: transfer CDT project from linux to windows [message #758733 is a reply to message #758693] Thu, 24 November 2011 07:26 Go to previous messageGo to next message
Eclipse UserFriend
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 02:46 Go to previous messageGo to next message
Eclipse UserFriend
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 08:38 Go to previous messageGo to next message
Eclipse UserFriend
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 209 times)
Re: transfer CDT project from linux to windows [message #759287 is a reply to message #758986] Mon, 28 November 2011 04:39 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: transfer CDT project from linux to windows [message #759376 is a reply to message #759287] Mon, 28 November 2011 08:55 Go to previous message
Eclipse UserFriend
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: Tue Jul 08 14:51:16 EDT 2025

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

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

Back to the top