I am trying to compile a Labview VI into a library (DLL or LIB) which can then be used by external applications. I am able to do this just fine, and can access the DLL in Python.
However I am haivg trouble getting this to work in C++, particularly Visual C++. It will compile fine, but when I get to the link stage, it gives me an unresolved external symbol error. I have included the .lib in the linker options and the set the library path properly. For instance, in the header file I have the following function.
double __cdecl LVDLLTest(double a, double b);
And in my .cpp code I have the following line:
double c = LVDLLTest(2, 3);
Compiling this will result in the errror:
Error 3 error LNK1120: 1 unresolved externals c:\Users\OHNS\Documents\Visual Studio 2012\Projects\OCT_LabVIEW_FPGA_Interface\Debug\OCT_LabVIEW_FPGA_Interface.exe OCT_LabVIEW_FPGA_Interface
Error 2 error LNK2019: unresolved external symbol _LVDLLTest referenced in function "int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@YAHPAUHINSTANCE__@@H@Z) c:\Users\OHNS\Documents\Visual Studio 2012\Projects\OCT_LabVIEW_FPGA_Interface\OCT_LabVIEW_FPGA_Interface\OCT_LabVIEW_FPGA_Interface.obj OCT_LabVIEW_FPGA_Interface
Any ideas? Thanks.