Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Creating project that can be used in Window and Linux environment
Creating project that can be used in Window and Linux environment [message #165843] Tue, 14 March 2006 19:27 Go to next message
Eclipse UserFriend
Originally posted by: andre_oriani.ig.com.br

Hi,

I need to create a project that can be used on Windows and Linux
environments at the same time. Both use the same files, but the paths to
access them are a little bit diferent. In Linux the paths start with
"/somefolder/" and in Windows they start with "V:". Someone told me to use
path entry variables, but when I import the project to Windows, it doesn't
work, and I cannot find where to set the variables to the correct paths.

Thanks for your attention,
André Oriani
Re: Creating project that can be used in Window and Linux environment [message #166046 is a reply to message #165843] Fri, 17 March 2006 20:42 Go to previous message
Eclipse UserFriend
Originally posted by: RocketLinuxNOJUNK.nojunkrocketcomp.com.au

On Wed, 15 Mar 2006 05:27:22 +1000, André Oriani <andre_oriani@ig.com.br>
wrote:

> Hi,
>
> I need to create a project that can be used on Windows and Linux
> environments at the same time. Both use the same files, but the paths to
> access them are a little bit diferent. In Linux the paths start with
> "/somefolder/" and in Windows they start with "V:". Someone told me to
> use path entry variables, but when I import the project to Windows, it
> doesn't work, and I cannot find where to set the variables to the
> correct paths.
>
> Thanks for your attention,
> André Oriani
>

If you are using stdc library, console programs CAN be nearly 100%
source-compatible (with some exceptions). However, there are circumstances
when you have to determine which OS you are targetting.

There are some predefined contants you can use eg

#ifdef _WIN32
/// windows stuff
#else
/// linux stuff
#endif
Previous Topic:Cygwin Path
Next Topic:help: invalid include path
Goto Forum:
  


Current Time: Sat Dec 21 13:51:36 GMT 2024

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

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

Back to the top