Click here to Skip to main content
15,894,740 members
Articles / Desktop Programming / MFC

Multi platform plug-in development made easy!

Rate me:
Please Sign up or sign in to vote.
4.04/5 (25 votes)
7 Mar 20065 min read 102K   1.9K   63  
How to use and develop plug-ins for multiple platforms.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>SPL Library: spl_platform.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>spl_platform.h</h1><a href="spl__platform_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 
00028 <span class="comment">//---------------------------------------------------------------------------------------------------------------------------</span>
00033 <span class="comment"></span><span class="comment">//---------------------------------------------------------------------------------------------------------------------------</span>
00034 
00035 <span class="preprocessor">#ifndef         __SPL_PLATFORM_H__</span>
00036 <span class="preprocessor"></span><span class="preprocessor">#define         __SPL_PLATFORM_H__</span>
00037 <span class="preprocessor"></span>
00038 <span class="comment">//</span>
00039 <span class="comment">// PLATFORM DEFINES</span>
00040 <span class="comment">//</span>
<a name="l00041"></a><a class="code" href="spl__platform_8h.html#a0">00041</a> <span class="preprocessor">#define         SPL_PLATFORM_WIN32                      1</span>
<a name="l00042"></a><a class="code" href="spl__platform_8h.html#a1">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define         SPL_PLATFORM_LINUX                      2</span>
<a name="l00043"></a><a class="code" href="spl__platform_8h.html#a2">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define         SPL_PLATFORM_APPLE                      3</span>
00044 <span class="preprocessor"></span>
00045 <span class="comment">//</span>
00046 <span class="comment">// COMPILER DEFINES</span>
00047 <span class="comment">//</span>
<a name="l00048"></a><a class="code" href="spl__platform_8h.html#a3">00048</a> <span class="preprocessor">#define         SPL_COMPILER_VCPLUSPLUS         1</span>
<a name="l00049"></a><a class="code" href="spl__platform_8h.html#a4">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define         SPL_COMPILER_BCPLUSPLUS         2</span>
<a name="l00050"></a><a class="code" href="spl__platform_8h.html#a5">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define         SPL_COMPILER_GNUC                       3</span>
<a name="l00051"></a><a class="code" href="spl__platform_8h.html#a6">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define         SPL_COMPILER_CODEWARRIOR        4</span>
00052 <span class="preprocessor"></span>
00053 
00054 <span class="comment">//</span>
00055 <span class="comment">// PLATFORM DETECTION</span>
00056 <span class="comment">//</span>
00057 <span class="preprocessor">#if     defined( WIN32 ) || defined( __WIN32__ ) || defined ( _WIN32 ) || defined( WIN64 ) || defined( _WIN32_WCE )</span>
00058 <span class="preprocessor"></span>
00059 <span class="preprocessor">        #define SPL_PLATFORM                            SPL_PLATFORM_WIN32</span>
00060 <span class="preprocessor"></span>        <span class="comment">//</span>
00061         <span class="comment">// Save compile date and time to lib</span>
00062         <span class="comment">//</span>
00063 <span class="preprocessor">        #pragma comment( user, "Compiled on " __DATE__ " at " __TIME__ )</span>
00064 <span class="preprocessor"></span>
00065 <span class="preprocessor">#elif defined( __LINUX__ ) || defined( linux )</span>
00066 <span class="preprocessor"></span>
00067 <span class="preprocessor">        #define SPL_PLATFORM                            SPL_PLATFORM_LINUX</span>
00068 <span class="preprocessor"></span>
00069 <span class="preprocessor">#elif defined( __APPLE_CC__ ) || defined( APPLE_CC )</span>
00070 <span class="preprocessor"></span>
00071 <span class="preprocessor">        #define SPL_PLATFORM                            SPL_PLATFORM_APPLE</span>
00072 <span class="preprocessor"></span>
00073 <span class="preprocessor">#else</span>
00074 <span class="preprocessor"></span>
00075 <span class="preprocessor">        #error "ERROR: Operating system is unknown!"</span>
00076 <span class="preprocessor"></span>
00077 <span class="preprocessor">#endif  //      PLATFORM</span>
00078 <span class="preprocessor"></span>
00079 <span class="comment">//</span>
00080 <span class="comment">// COMPILER DETECTION</span>
00081 <span class="comment">//</span>
00082 <span class="preprocessor">#if defined( _MSC_VER )</span>
00083 <span class="preprocessor"></span>
00084 <span class="preprocessor">        #define SPL_COMPILER                            SPL_COMPILER_VCPLUSPLUS</span>
00085 <span class="preprocessor"></span>
00086 <span class="preprocessor">#elif defined( __BORLANDC__ ) || defined( __BCPLUSPLUS__ )</span>
00087 <span class="preprocessor"></span>
00088 <span class="preprocessor">        #define SPL_COMPILER                            SPL_COMPILER_BCPLUSPLUS</span>
00089 <span class="preprocessor"></span>
00090 <span class="preprocessor">#elif defined( __GNUC__ )</span>
00091 <span class="preprocessor"></span>
00092 <span class="preprocessor">        #define SPL_COMPILER                            SPL_COMPILER_GNUC</span>
00093 <span class="preprocessor"></span>
00094 <span class="preprocessor">#elif defined( __MWERKS__ )</span>
00095 <span class="preprocessor"></span>
00096 <span class="preprocessor">        #define SPL_COMPILER                            SPL_COMPILER_CODEWARRIOR</span>
00097 <span class="preprocessor"></span>
00098 <span class="preprocessor">#else</span>
00099 <span class="preprocessor"></span>
00100 <span class="preprocessor">        #error "ERROR: Compiler is unknown!"</span>
00101 <span class="preprocessor"></span>
00102 <span class="preprocessor">#endif  //      COMPILER</span>
00103 <span class="preprocessor"></span>
00104 
00105 <span class="preprocessor">#endif  //      __SPL_PLATFORM_H__</span>
00106 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun May 9 15:01:04 2004 for SPL Library by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.6 </small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Germany Germany
I was born in 1982 near Stuttgart / Germany and began my first steps in programming computers at the age of only nine years on an old Commodore CBM 7072. In 2002 I finished my education as IT specialist for software engineering and did my civillian service afterwards. Currently I'm working as leader of the software division in a bigger company located in south west Germany, mainly on software development and research projects for multimedia terminals and user recognition/verification systems.

Comments and Discussions