AnsweredAssumed Answered

C++ with Command Expert 1.1

Question asked by cma21 on Jul 9, 2012
Latest reply on May 24, 2013 by connectivity
Hello all, 

I am able to build a sequence of SCPI commands via Command Expert, but when I go to export the sequence in C++ format and copy the respective program into my VC++ 2010 software I reveice a bunch of errors. Is there something specific that I need to do in Visual Studio to allow this copy/paste method to work? 

Here is the simple code:

+#include "stdafx.h"+
+#include "visa.h"+


+int _tmain(int argc, _TCHAR* argv[])+
+{+


     +ViSession rm;+

     +viOpenDefaultRM(&rm);+

     +ViSession n9010a_exa_signal_analyzer;+

     +ViSession v5182_signal_generator;+

     +viOpen(rm, "TCPIP0::10.208.211.153::5025::SOCKET", VI_NULL, VI_NULL, &rm);+

     +viOpen(rm, "TCPIP0::10.208.211.33::5025::SOCKET", VI_NULL, VI_NULL, &rm);+

     +viPrintf(v5182_signal_generator, ":Freq 1962 MHz\n");+

     +viPrintf(v5182_signal_generator, ":Power 10 dBm\n");+

     +viPrintf(v5182_signal_generator, "*RCL 1\n");+

     +viPrintf(v5182_signal_generator, "*RCL 0\n");+

     +viClose(n9010a_exa_signal_analyzer);+
     +viClose(v5182_signal_generator);+


     +return 0;+


+}+



And the respective errors I receive:

'FileStateRecall.exe': Loaded 'C:\Users\mcdonnelcj\Documents\Visual Studio 2010\Projects\FileStateRecall\Debug\FileStateRecall.exe', Symbols loaded.
'FileStateRecall.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\sysfer.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\visa32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\agvisa32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\version.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\shlwapi.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\shell32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\ole32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\msvcr100.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\msvcp100.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
'FileStateRecall.exe': Loaded 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\AMInit32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Program Files\IVI Foundation\VISA\WinNT\agvisa\instr32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\sicl32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Program Files\IVI Foundation\VISA\WinNT\agvisa\autocf32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Program Files\Agilent\IO Libraries Suite\drivers\agtlan32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Program Files\Agilent\IO Libraries Suite\drivers\agilan32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\wsock32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\ws2_32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\nsi.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\siclrpc.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\IPHLPAPI.DLL', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\winnsi.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Program Files\Agilent\IO Libraries Suite\drivers\agtcpi32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Program Files\Agilent\IO Libraries Suite\drivers\agsock32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Program Files\Agilent\IO Libraries Suite\drivers\aghislip32.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\mswsock.dll', Cannot find or open the PDB file
'FileStateRecall.exe': Loaded 'C:\Windows\System32\WSHTCPIP.DLL', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x14d8) has exited with code 0 (0x0).
Run-Time Check Failure #3 - The variable 'v5182_signal_generator' is being used without being initialized.
Run-Time Check Failure #3 - The variable 'v5182_signal_generator' is being used without being initialized.
Run-Time Check Failure #3 - The variable 'v5182_signal_generator' is being used without being initialized.
Run-Time Check Failure #3 - The variable 'v5182_signal_generator' is being used without being initialized.
Run-Time Check Failure #3 - The variable 'n9010a_exa_signal_analyzer' is being used without being initialized.
Run-Time Check Failure #3 - The variable 'v5182_signal_generator' is being used without being initialized.
The thread 'Win32 Thread' (0x1a2c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1f98) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1b50) has exited with code 0 (0x0).
The program '[8164] FileStateRecall.exe: Native' has exited with code 0 (0x0).


*Thanks in advance!*  

Outcomes