• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Fix/Patch Cross Platform Linux/Windows - Preprocessor Directive - Solution to missing method

Linxsis

Banned User
Joined
Nov 18, 2017
Messages
243
Solutions
10
Reaction score
114
I recently came across an issue compiling while working both in Linux & Windows. The issue was a method which did not exist in Linux but existed in Windows. To resolve the issue I wrote this within the source document.
C++:
#ifdef __linux__
    #ifndef /* miss_method */
        #define /* missing_method  existing_method */
    #endif
#endif
 
This small fix allowed me to use the same code for both platforms.
 
Back
Top