My Oracle Support Banner

Linking C++/CLI OCCI Windows Form application fails with LNK2028 referencing __clrcall (Doc ID 1438431.1)

Last updated on AUGUST 04, 2018

Applies to:

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


Linking C++ Windows Form application which uses the Oracle C++ Call Interface (OCCI) fails with LNK-2028

An example linker error is as follows:

Error 1 error LNK2028: unresolved token (0A000012) "public: static void __clrcall oracle::occi::Environment::terminateEnvironment(class oracle::occi::Environment *)" (?terminateEnvironment@Environment@occi@oracle@@$$FSMXPAV123@@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

Compiling a Win32 console application compiles fine however.


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.