1.

How Can I Use The Paradox Engine 1.0 With C++?

Answer»

Because the Paradox Engine functions are all compiled as C functions, you will have to assure that the names of the functions do not get "mangled" by the C++ compiler. To do this you NEED to prototype the Engine functions as extern "C". In the pxengine.h header file insert the following code at the lines indicated. 

/* inserted at line # 268 */ 

#ifdef __cplusplus 

extern "C" { 

#ENDIF 

/* inserted at line # 732, just before the final #endif */ 

#ifdef __cplusplus 

} #endif 

Paradox Engine version 2.0 is "AWARE" of C++ and thus does not require any modifications to its header file.

Because the Paradox Engine functions are all compiled as C functions, you will have to assure that the names of the functions do not get "mangled" by the C++ compiler. To do this you need to prototype the Engine functions as extern "C". In the pxengine.h header file insert the following code at the lines indicated. 

/* inserted at line # 268 */ 

#ifdef __cplusplus 

extern "C" { 

#endif 

/* inserted at line # 732, just before the final #endif */ 

#ifdef __cplusplus 

} #endif 

Paradox Engine version 2.0 is "aware" of C++ and thus does not require any modifications to its header file.



Discussion

No Comment Found