Menu

#1 pcx.h is C only header, not externed for C++ projects

open
nobody
None
5
2007-07-18
2007-07-18
Anonymous
No

I appear to have many linking errors when using g++ and including pcx.h. This is with devkitARM release 19, compiling for Gameboy Advance. I corrected the issue by externing the header file as such (in between all the header definitions):

// pcx.h
#ifdef __cplusplus
extern "C" {
#endif
// ALL the Header definitions

#ifdef __cplusplus
}
#endif

It may be beneficial to change this, as not all users of libgba will be using C. Am I mistaken, or did I miss something in the docs (perhaps this is a C only library and I am a ding head that needed to make changes myself and this is stated somewhere).

Either way, a simple fix to save headaches for users, if you could please :) I can even modify all the headers and cvs them for you if you need, there are not many.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB