Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with example 4882MFC

i tried to compile your exampl file 4882MFC

and I have following error:
what can it be??
--------------------Configuration: 4882MFC - Win32 Release--------------------
Compiling...
4882MFCDlg.cpp
Linking...
4882MFCDlg.obj : error LNK2001: unresolved external symbol _ibcntl
4882MFCDlg.obj : error LNK2001: unresolved external symbol _ReadStatusByte@12
4882MFCDlg.obj : error LNK2001: unresolved external symbol _WaitSRQ@8
4882MFCDlg.obj : error LNK2001: unresolved external symbol _DevClear@8
4882MFCDlg.obj : error LNK2001: unresolved external symbol _ibonl@8
4882MFCDlg.obj : error LNK2001: unresolved external symbol _Receive@20
4882MFCDlg.obj : error LNK2001: unresolved external symbol _Send@20
4882MFCDlg.obj : error LNK2001: unr
esolved external symbol _ibcnt
4882MFCDlg.obj : error LNK2001: unresolved external symbol _FindLstn@16
4882MFCDlg.obj : error LNK2001: unresolved external symbol _ibsta
4882MFCDlg.obj : error LNK2001: unresolved external symbol _SendIFC@4
4882MFCDlg.obj : error LNK2001: unresolved external symbol _iberr
.\Release/4882MFC.exe : fatal error LNK1120: 12 unresolved externals
Error executing link.exe.

4882MFC.exe - 13 error(s), 0 warning(s)

what can it be??
0 Kudos
Message 1 of 3
(3,563 Views)
Hi,

I couldn't find the same example (488mfc). Did you get it from the web?. Anyways...

As you can see this is a linker error. This means that your source was properly compiled. The linker has to resolved the undefined functions. In this case, all the GPIB function are unresolved. To solve this you need to include the library that contains the functions.

For the MS C++ interface I believe that an object file is included. This file needs to be added to your project's settings. If the functions where defined in a dll, you would need to add a .lib file to your project's settings.

The following link has some information:
Language Interface: 32-bit Microsoft Visual C/C++


DiegoF
0 Kudos
Message 2 of 3
(3,563 Views)
It looks like this question was accidentally posted twice. Please also refer to the answers under the other post.

- Elton
0 Kudos
Message 3 of 3
(3,563 Views)