By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,415 Members | 1,091 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,415 IT Pros & Developers. It's quick & easy.

OS dependent definitions

P: n/a
Is there definitions to understand preprocessor in what platform runs?

like
#ifdef WIN32
#ifdef UNIX
etc?

Of course these are not part of C++ but I want a main-stream solution to
write OS dependent code in a cross-platform library.

thanks
Mar 8 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
chameleon wrote:
Is there definitions to understand preprocessor in what platform runs?
Usually.
like
#ifdef WIN32
#ifdef UNIX
etc?

Of course these are not part of C++ but I want a main-stream solution
to write OS dependent code in a cross-platform library.
RTFM. Your compiler manual contains all descriptions for pre-defined
macros.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Mar 8 '07 #2

P: n/a

"chameleon" <ch******@hotmail.comwrote in message
news:Za********************@twister1.libero.it...
Is there definitions to understand preprocessor in what platform runs?

like
#ifdef WIN32
#ifdef UNIX
etc?
Each implementation will define its own macros which indicate e.g.
the intended target platform, configurations, etc. Some implementations
target a single platform, others target two or more. Read your
documentation.
>
Of course these are not part of C++ but I want a main-stream solution to
write OS dependent code in a cross-platform library.
The closest to 'main stream' you could get would be to use 'main stream'
tools (but of course different folks have different notions of which tools
are 'main stream').

-Mike

Mar 8 '07 #3

P: n/a
Take a look at this site: http://predef.sourceforge.net/

-Davis
On Mar 8, 1:00 pm, chameleon <cham_...@hotmail.comwrote:
Is there definitions to understand preprocessor in what platform runs?

like
#ifdef WIN32
#ifdef UNIX
etc?

Of course these are not part of C++ but I want a main-stream solution to
write OS dependent code in a cross-platform library.

thanks

Mar 9 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.