Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preprocessor - Cross Platform

Status
Not open for further replies.

Miquella

Programmer
Mar 11, 2005
41
US
I'm currently developing a program that needs to be cross-platform, but some of my abstraction layer needs to be platform specific. I know that there are some Preprocessors that work on certain systems, but I'm wondering if there are standards for such things?

I'm currently using things such as:

Code:
_WIN32
__WIN__
__UNIX__
__APPLE__

But I know that these are not always constant, and some not even prevalent, but is there a better way to do this??

Thanks for your help!

-Miq
 
These are normally set by some makefile somewhere. Very often they are not even built into the compiler. There is no standard as far as I know.

Have a look at the sources for FLTK in It supports the same platforms.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top