10-16-2014 09:05 PM
Hi A.R.M:
Do you creat libgpib.a file vi MarkoSat's method? Could you shere to me. I'm faild to creat the libgpib.a file. I am using pexpors(0.46).
Thanks.
Mitchell
10-16-2014 11:07 PM
I did get it to work after a while, A zip file with all the stuff I used as well as the resulting .a file is attached. One of my lab mates had trouble with it on a different computer, but switched over to the MSCPP version of Qt and said everything worked right away. Cheers -A
10-17-2014 12:10 AM
Hi A.R.M:
Thank you for sharing.
Mitchell
10-17-2014 01:18 AM
Hi A.R.M:
I try to use the libgpib.a, but something wrong. The fail message shwo as below:
An exception was triggered:
Exception at 0x7c9873be, code: 0xc0000139: DLL entry point not found, flags=0x0.
During startup program exited with code 0xc0000139.
below is my code:
.pro
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../build-GPIBTest-Desktop_Qt_5_3_MinGW_32bit-Debug/release/ -lgpib
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../build-GPIBTest-Desktop_Qt_5_3_MinGW_32bit-Debug/debug/ -lgpib
else:unix: LIBS += -L$$PWD/../build-GPIBTest-Desktop_Qt_5_3_MinGW_32bit-Debug/ -lgpib
INCLUDEPATH += $$PWD/../build-GPIBTest-Desktop_Qt_5_3_MinGW_32bit-Debug/debug
DEPENDPATH += $$PWD/../build-GPIBTest-Desktop_Qt_5_3_MinGW_32bit-Debug/debug
.cpp file
int hDev;
if(hDev=ibdev(0,17,0,T10s,1,10)<0)
{
QMessageBox::warning(0,"","Unable to get a vaild description of Power supply");
}
else
{
QMessageBox::warning(0,"","Get a vaild description of Power supply");
}
Do you have encountered the same problem?
Mitchell
10-17-2014 09:41 AM
My project file is below, the important stuff is at the end:
QT += core gui webkit greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = UtilSweep TEMPLATE = app SOURCES += main.cpp\ utilsweep.cpp \ agilentsweeper.cpp \ qcustomplot.cpp \ lockin7265.cpp \ keithley2k.cpp \ lockin7270.cpp \ daqlakeshoremag.cpp \ utilsweepdata.cpp HEADERS += utilsweep.h \ agilentsweeper.h \ qcustomplot.h \ keithley2k.h \ lockin7265.h \ lockin7270.h \ ni488.h \ NIDAQmx.h \ daqlakeshoremag.h \ utilsweepdata.h FORMS += utilsweep.ui \ agilentsweeper.ui win32: LIBS += -L$$PWD/ -lNIDAQmx LIBS += $$PWD/libgpib.a INCLUDEPATH += $$PWD/ DEPENDPATH += $$PWD/
where there is a copy of the GPIB files in the same directory. You have windows.h included first in the source right? -A
10-20-2014 01:46 AM
Hi A.R.M:
Thanks for your reply. I have success to use the lib. I think that I put the libgpib.a to the debug folder cuase this problem. I put the libgpib to the same folder then solve this problem. Thanks for your help.
Mitchell
01-31-2018 05:52 AM
Hi A.R.M,
after a long time, your post and your zip file were still useful for me and I just wanted to say: Thank you!
01-31-2018 08:25 PM
Glad to hear it! Made my morning. -A
01-27-2020 12:56 AM
Hi Marko,
Thanks for step by step description.
I run the commands in CMD. Unfortunately, my generated libgpib.a after running "dlltool -k -D gpib-32.dll -d gpib.def -l libgpib.a" command is 0 kB.
In addition, after running the command "pexports -h ni488.h gpib-32.dll > gpib.def", following error is generated:
'gcc' is not recognized as an internal or external command operable program or batch file.
how can i solve the problems?
thanks a lot.