Menu

pmask & c++

Help
zane
2004-10-06
2013-01-01
  • zane

    zane - 2004-10-06

    Ive recently downloaded this libary, and it is excellent.
    unfortunatly the game I wish to use it in uses c++ instead of straight c. Is there a way for the libary to compile for c++.
    thanks

     
    • - 2004-11-20

      Most development environments will be happy to link object files or libraries made from C code with other object files or libraries made from C++ code.  Some slightly special stuff is necessary in the header files, but PMASKs headers should already contain the necessary stuff (an extern "C" statement in an ifdef __cplusplus at the top, and a close curly brace in a similar ifdef at the bottom). 

      If you wanted to, you could probably also compile PMASK as C++ code instead of C code (just rename the .c files to .cpp) - I think the PMASK code already includes the things necessary for that (explicit pointer casts on void pointers, that kind of thing).  But that shouldn't be necessary. 

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.