I have a small Windows x64 Console program statically linked to oci.lib (12.1.0.1.0) which was working well so far until I tried to use the APIs OCIObjectGetAttr/OCIObjectSetAttr. Now my program gives the following Linker errors:
Error 19 error LNK2019: unresolved external symbol "int __cdecl OCIObjectSetAttr(struct OCIEnv *,struct OCIError *,void *,void *,struct OCIType *,unsigned char const * *,unsigned int const *,unsigned int,unsigned int const *,unsigned int,short,void const *,void const *)" (?OCIObjectSetAttr@@YAHPEAUOCIEnv@@PEAUOCIError@@PEAX2PEAUOCIType@@PEAPEBEPEBII5IFPEBX6@Z) referenced in function "bool __cdecl dump_object(struct OCIEnv *,struct OCIError *,struct OCISvcCtx *,void *,void *,void *)" (?dump_object@@YA_NPEAUOCIEnv@@PEAUOCIError@@PEAUOCISvcCtx@@PEAX33@Z)
Error 20 error LNK2019: unresolved external symbol "int __cdecl OCIObjectGetAttr(struct OCIEnv *,struct OCIError *,void *,void *,struct OCIType *,unsigned char const * *,unsigned int const *,unsigned int,unsigned int const *,unsigned int,short *,void * *,void * *,struct OCIType * *)" (?OCIObjectGetAttr@@YAHPEAUOCIEnv@@PEAUOCIError@@PEAX2PEAUOCIType@@PEAPEBEPEBII5IPEAFPEAPEAX7PEAPEAU3@@Z) referenced in function "bool __cdecl dump_object(struct OCIEnv *,struct OCIError *,struct OCISvcCtx *,void *,void *,void *)" (?dump_object@@YA_NPEAUOCIEnv@@PEAUOCIError@@PEAUOCISvcCtx@@PEAX33@Z)
Commenting only those two APIs fixes the linker error. I made sure that nothing in project is changed apart from adding the two OCIObjectGetAttr and OCIObjectSetAttr API calls. Other OCIObject* APIs are linking. dumpbin /exports oci.lib shows that OCIObjectGetAttr and OCIObjectSetAttr are exported from the oci.lib.
What am I missing?
Stuck with this for quite a while. Google/Community search hasn't helped either.
Please help.
TIA
NB: Also posted in OTN (https://community.oracle.com/message/12457198#12457198) Please forgive duplicate posting in desperation