Linking C++/CLI OCCI Windows Form application fails with LNK2028 referencing __cdecl

(Doc ID 1438411.1)

Last updated on JULY 05, 2017

Applies to:

Oracle Database - Enterprise Edition - Version and later
Microsoft Windows x64 (64-bit)


Linking C++/CLI  Windows Form application which uses the Oracle C++ Call Interface (OCCI) fails with LNK-2028, although the environment is set correctly to reference oraocci11.lib or oraocci11d.lib

An example link error is as follows:

Error 1 error LNK2028: unresolved token (0A000011) "public: static void __cdecl oracle::occi::Environment::terminateEnvironment(class oracle::occi::Environment *)" (?terminateEnvironment@Environment@occi@oracle@@$$FSAXPAV123@@Z) referenced in function "private: void __clrcall occiwinformapp2::Form1::Form1_Load(class System::Object ^,class System::EventArgs ^)" (?Form1_Load@Form1@occiwinformapp2@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z) C:\testcases\occiwinformapp2\occiwinformapp2\occiwinformapp2.obj occiwinformapp2


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms