Dear All,
I'm in the process of writing a piece of Java code to drive a GPIB interface. ini order to do that, I use swig (http://www.swig.org ) to generate the JNI wrapper around the drivers. This application has to run on linux and windows, so I use libgpib for linux and the NI drivers (namely ni488.h and gpib-32.obj) for windows (both drivers have the same interface). This works well on Linux, but I can't get it to work on windows. I tried with two compilers (minGW and VS C++ 2005), and I have the following errors during the linking stage (with VS, sorry the error messages are in french, but they simply mean "external symbol not found"):
link linux-gpib_wrap.obj "c:\program files\national instruments\NI-488.2\languages\microsoft C\gpib-32.obj" "c:\program files\Microsoft Platform SDK for Windows server 2003 R2\lib\uuid.lib" "c:\program files\java\jdk1.6.0_04/lib/jvm.lib"
linux-gpib_wrap.obj : error LNK2019: symbole externe non résolu _AllSPoll référe
ncé dans la fonction _Java_linuxgpibJNI_AllSPoll@28
linux-gpib_wrap.obj : error LNK2019: symbole externe non résolu _AllSpoll référe
ncé dans la fonction _Java_linuxgpibJNI_AllSpoll@28
linux-gpib_wrap.obj : error LNK2019: symbole externe non résolu _DevClear référe
ncé dans la fonction _Java_linuxgpibJNI_DevClear@20
[..]
linux-gpib_wrap.obj : error LNK2019: symbole externe non résolu _ibwrtf référenc
é dans la fonction _Java_linuxgpibJNI_ibwrtf@16
linux-gpib_wrap.obj : error LNK2019: symbole externe non résolu _gpib_error_stri
ng référencé dans la fonction _Java_linuxgpibJNI_gpib_1error_1string@12
linux-gpib_wrap.dll : fatal error LNK1120: 74 externes non résolus
The symbols not found are those described by ni488.h, so I suppose that the gpib-32.obj library is not used by the linker. Any idea why?
Sorry if this is a basic question, but I haven't used a C compiler for years, and I cannot find my mistake....
Regards
Cyril