Creating project that can be used in Window and Linux environment [message #165843] |
Tue, 14 March 2006 19:27 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03059 seconds