Discussion:
linker error when using dev C++ for GPIB
(too old to reply)
dorna
2008-08-08 23:10:07 UTC
Permalink
Can someone help me with this! I'm having a problem buiding my simple gpib (readin/writing to VNA) program in dev c++. So even this following simplest of programs gives me a linker error: #include <stdio.h>#include <stdlib.h>#include <malloc.h>/* *  Include the WINDOWS.H and DECL-32.H files. The standard Windows *  header file, WINDOWS.H, contains definitions used by DECL-32.H and *  DECL-32.H contains prototypes for the GPIB routines and constants. */ #include <windows.h>#include "ni488.h"int main() {    int ud0;    ud0=ibdev(0,16,0,13,1,0); //takes the addresses, 16 is the address of the device(VNA)} This is a C project, I have added gpib-32.obj to the project and also the ni488.h. I got both of these files form the languages\microsoft C directory in national instruments directory. I get this error:  [Linker error] undefined reference to `***@24' What is going on! none of the sample programs work either. Is it because it's dev c++? Thanks so much for helping!!
muks
2008-08-11 12:10:10 UTC
Permalink
When i digged the forum i got this
under the "Project" menu - "properties" -
"linker" - "Command line", I added "...\GPIB.obj" to the additional
options textbox.  This provides the missing link to the object file.
But you had mentioned that you have already done this.Let me digg further and let  u know
Simran_K
2008-08-11 22:40:09 UTC
Permalink
Hi Dorna,
If you include the file as #include "ni488.h", you need to make sure the ni488.h file is included in the project. If it is not please include the file as #include <ni488.h>.
Thank you,

Loading...