The ifdef statement is needed because the header file is seen by both the C++ compiler, which does name mangling (to support overloaded methods) and the C compiler, which does not. I'd forgotten that step; it's in the header file I looked at to confirm that the syntax was right, but I glossed over why it was there.