I encountered a problem in my project as a function name, PropertyNotify() in couples of classes, in the FBX static library has already been defined as a macro int value in X11/X.h on Linux.
virtual bool PropertyNotify(eFbxPropertyCallback, KFbxProperty*); //kfbxobject.h
virtual bool PropertyNotify(eFbxPropertyCallback pType, KFbxProperty* pProperty); //kfbxnode.h
virtual bool PropertyNotify(EPropertyNotifyType pType, FbxProperty& pProperty); //fbxmanipulators.h
virtual bool PropertyNotify(eFbxPropertyCallback pType, KFbxProperty* pProperty); //kfbxtexture.h
#define PropertyNotify 28 //X.h
The FBX is not open source and only provides the include headers and static and dynamic library (.a and .os), hence I can only include the FBX headers in my application but cannot touch the source files. I think the naming issue may be the caused of the compilation error "expected unqualified-id before numeric constant" I have got.
I tried calling "objcopy --redefine-sym PropertyNotify=FbxPropertyNotify libfbxsdk.a" in order to redefine the function name in the static library. By doing this, the "expected unqualified-id" error was solved, however, it seemed somehow messed up the static library because it caused hundreds of undefined references error in the codes where the FBX functions or objects being called.
I am wondering what is the solution to this issue? As suggested by someone, creating a wrapper of the FBX library could probably solve the problem. If that is possible, it would be very kind if anyone could share some detailed tutorial or guidance on how to implement it on Ubuntu. Thanks in advance.