Hello,
It seems there is a problem with using the /MT (static link) option when compiling programs using NI488.2. The /MD (dynamic link) option works fine.
The issue is even present when compiling standard example scripts, such as "FindInstruments.c"
The error messages during compilation are:
1>ni4882.obj : error LNK2019: unresolved external symbol __imp__fread referenced in function _LoadFunction@4
1>ni4882.obj : error LNK2019: unresolved external symbol __imp__fopen referenced in function _LoadFunction@4
1>ni4882.obj : error LNK2019: unresolved external symbol __imp__strncat referenced in function _LoadFunction@4
1>ni4882.obj : error LNK2019: unresolved external symbol __imp__rand referenced in function _LoadFunction@4
1>ni4882.obj : error LNK2019: unresolved external symbol __imp__srand referenced in function _LoadFunction@4
1>ni4882.obj : error LNK2019: unresolved external symbol __imp__time referenced in function _LoadFunction@4
There is no problem compiling with /MD.
Here are some old threads I found on the topic with no resolution for using static linking, the only "solution" is to use dynamic linking. But many applications (including mine) require static linking...
https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Linker-error-VC-2008/td-p/1045477
Has anybody got it to work using 488.2 libraries with static linking?