From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Dll with Uir in Visual C++

Hi all,

I'm using LabWindows CVI 6.0.
I'm doing some tests to move some code into Dll.
I succeeded to create a Dll in CVI that load a panel. It is correctly called
from CVI.
I succeeded to create a simple test Dll from crash with Visual C++. It is
correctly called from CVI.
I tried to compile the code of the Dll in CVI that load a panel under Visual
C++ 6.0 en have some problems:
As I'm loading panel, I need the followin include:
#include
#include
#include "mon_interface.h"
#include

I add the following lib path:
C:\Program Files\National Instruments\MeasurementStudio\CVI\include

I have got problems while linking:
Linking...
mon_interface.obj : error LNK2001: unresolved external symbol _CloseCVIRTE@0
mon_interfa
ce.obj : error LNK2001: unresolved external symbol
_InitCVIRTEEx@12
mon_interface.obj : error LNK2001: unresolved external symbol
_DiscardPanel@4
mon_interface.obj : error LNK2001: unresolved external symbol
_RunUserInterface@0
mon_interface.obj : error LNK2001: unresolved external symbol
_DisplayPanel@4
mon_interface.obj : error LNK2001: unresolved external symbol _LoadPanel@12
Debug/dll_vc.dll : fatal error LNK1120: 6 unresolved externals
Error executing link.exe.

I manually added the following lib file: cvistart.lib

It does not help.

Have you got any idea???

Thanks in advance,

Sylvain
0 Kudos
Message 1 of 3
(2,948 Views)
You need to add the import libraries for the CVI runtime (cvirt.lib) and any libraries you are using to your project. These libraries can be found in the cvi\extlib directory.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 3
(2,948 Views)
Thanks a lot!!!
I also had to add the following lib files:
cviwmain.lib
cvisup.lib

Now, it is working.
Thank's again 🙂

Sylvain

"Chris Matthews" a écrit dans le message de news:
506500000005000000970A0100-1042324653000@exchange.ni.com...
> You need to add the import libraries for the CVI runtime (cvirt.lib)
> and any libraries you are using to your project. These libraries can
> be found in the cvi\extlib directory.
>
> Best Regards,
>
> Chris Matthews
> National Instruments
0 Kudos
Message 3 of 3
(2,948 Views)