12-18-2007 11:16 AM
12-19-2007
08:25 AM
- last edited on
02-02-2025
04:32 PM
by
Content Cleaner
James,
Before the statement to include "ni488.h", you need to include the following line at the beginning of your application:
#include "windows.h"
#include "ni488.h"
There is a web page about how to use the Microsoft 32 bit Language Interface. It's a little out of date as it refers to the old header file, "decl-32.h", instead of the new one, "ni488.h", but the basic concepts are there.
Hope this information helps.
gpibtester
12-19-2007 08:42 AM
12-19-2007
08:56 AM
- last edited on
02-02-2025
04:32 PM
by
Content Cleaner
James,
Glad that the information helped!
I just found out that the link in the previous post was bad. Here's the correct link to the Microsoft 32 bit Language Interface.
gpibtester
12-19-2007 09:46 AM
12-20-2007 08:29 AM
Can you provide any help on this one?
Compiler: Default compiler Building Makefile: "D:\Documents and Settings\e348953\Desktop\Makefile.win" Executing make... make.exe -f "D:\Documents and Settings\e348953\Desktop\Makefile.win" all g++.exe main.o -o "Project1.exe" -L"C:/Dev-Cpp/lib" -lm "../../All Users/Documents/National Instruments/NI-488.2/Languages/Microsoft C/gpib-32.obj"
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Execution terminated
Here is the main;
#include <cstdlib>
#include <iostream>
#include <windows.h>
#include "ni488.hpp"
int main(int argc, char *argv[]) {
system("PAUSE");
int gpib;
gpib = ibfind("gpib0");
ibsic(gpib);
ibcmd(gpib,const_cast<char*>("_?@3"),4L;
ibwrt(gpib,const_cast<char*>("C2"),2L);
ibcmd(gpib,const_cast<char*>("_"),1L);
return EXIT_SUCCESS;
}
12-20-2007 10:38 AM
12-20-2007 11:12 AM
Christian,
I am using Dev C++ 4.9.9.2. I saw those posts you hyperlinked when I was searching myself, but everything I saw was a DirectX failure, which I didn't think applied here.
Thank you for the help!
03-20-2012 10:54 PM
Hi Christian,
I have been searching quite a few forums to my problems and I have noticed that you are an avid helper in such areas so I was hoping you could assist me in finding the header file named ni-488.h header file that supposedly stores all the GPIB commands that I may use in my c++ program to control test equipments. The usual answer is that it is in the NI-488.2 file and then languages but I can't find this "languages" file.
I'm currently using windows 7 and I installed the GPIB driver just by connecting the GPIB-USB connector to my pc.
I'm using a free compiler IDE called Codeblocks.
Am I missing any other drivers because if I am, could you point me in the direction to my problem. Please do email me.
Any help would be greatly appreciated!
Regards,
dIn
wahidin88@gmail.com
03-23-2012
08:58 AM
- last edited on
02-02-2025
04:33 PM
by
Content Cleaner
Hi,
If you installed the latest GPIB driver, NI-488.2 for Windows, by default it installs example files which are accessible from the Start->Programs menu. You will probably want to refer to the Direct Entry Examples to use with your particular C++ compiler.
Hope this information is helpful.
gpibtester