06-17-2010 01:26 PM
Hi,
I am trying to create a C program which can remotely control my Attenuation box remotely using NI-GPIB. I read the userManual of NI-488.2 and installed the Measurment & Automation s/w on my PC. I was able to "Communicate with Instrument" and use "Interactive Control" to send commands and receive expected info.
Now I want to pick up the "sample" file provided by NI, and compile it with including ni4882.h and ni4882.obj But when I try to link the project with ni4882.obj, the VC++ 6.0 gives following error:
--------------------Configuration: template_automation - Win32 Debug--------------------
Linking...
LINK : warning LNK4098: defaultlib "LIBCD" conflicts with use of other libs; use /NODEFAULTLIB:library
ni4882.obj : fatal error LNK1103: debugging information corrupt; recompile module
Error executing link.exe
Can you pls provide me with the *.obj file which I would link with VC++ 6.0? Or I guess source code file which has all the functions listed in ni4882.h.
thanks,
06-17-2010 05:25 PM
06-17-2010 06:38 PM
Yeah I am using C:\Program Files\National Instruments\NI-488.2\Bin\sample.txt with following includes:
#include <stdio.h>
#include <windows.h>
#include "ni4882.h"
And I get this error:
Linking...
ni4882.obj : fatal error LNK1103: debugging information corrupt; recompile module
I also looked at http://forums.ni.com/ni/board/message?board.id=140&message.id=41079#M41079 and tried
cl /I"%NIEXTCCOMPILERSUPP%\include" sample.c "%NIEXTCCOMPILERSUPP%\lib32\msvc\ni4882.obj" /MD
which gives C:\testing\template_automation.c(6) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
06-18-2010 10:11 AM
According to this, this appears to be an issue with trying to use a newer version of NI-488.2 with older compilers.
06-18-2010 11:58 AM
I am using 4.5.0f0 version of Measurment & Automation. Is that OK or you suggest some other version?
thanks
06-18-2010 12:09 PM
The version of MAX is totally irrelevant. The link talked about the version of NI-488.2 and the version of Visual C++.
06-18-2010 12:13 PM
2.60
06-18-2010 12:22 PM
When I use gpib-32.obj it gives this error
Linking...template_automation.obj :
error LNK2001: unresolved external symbol _Ibcnt@0template_automation.obj :
error LNK2001: unresolved external symbol _Ibsta@0template_automation.obj :
error LNK2001: unresolved external symbol _Iberr@0Debug/template_automation.exe :
fatal error LNK1120: 3 unresolved externalsError executing link.exe.
template_automation.exe - 4 error(s), 0 warning(s)
06-18-2010 03:06 PM
I would suggest either using an older version of NI-488, or a newer compiler. Microsoft has Express versions of the latest compilers available for free.
06-18-2010 04:06 PM
Can you pls recommend which specific version of NI 488 should I use with VC++ 6.0 ?
thanks
-M.