Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL problem using JNI and Gpib-32.h

Hi,

I'm using the Netbeans 6 IDE.

I want to communicate with some instrument with GPIB using a java application.
I'm using JNI and it works well. (I mean the JNI part).

In my new JNI dll I want to use some of the function from the Gpib-32.h.

I have include the windows.h

but when I build there is some errors:

Running "C:\Cygwin\bin\make.exe  -f Makefile CONF=Debug" in C:\WorkspaceHugo\GPIBDriverDLL

/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/c/WorkspaceHugo/GPIBDriverDLL'
mkdir -p build/Debug/Cygwin-Windows
g++.exe -mno-cygwin -Wl,--add-stdcall-alias -shared -m32   -c -g -IC\:/Program\ Files/Java/jdk1.6.0/include -IC\:/Program\ Files/Java/jdk1.6.0/include/win32 -fPIC  -o build/Debug/Cygwin-Windows/GPIBGenericDriver.o GPIBGenericDriver.cc
GPIBGenericDriver.cc:1: warning: -fPIC ignored for target (all code is position independent)
g++: --add-stdcall-alias: linker input file unused because linking not done
mkdir -p dist
g++.exe -mno-cygwin -Wl,--add-stdcall-alias -shared -m32    -mno-cygwin -shared -o dist/GPIBGenericDriver.dll -fPIC build/Debug/Cygwin-Windows/GPIBGenericDriver.o 
build/Debug/Cygwin-Windows/GPIBGenericDriver.o: In function `Java_driver_GenericDriver_Initialize':
/cygdrive/c/WorkspaceHugo/GPIBDriverDLL/GPIBGenericDriver.cc:55: undefined reference to `_ibdma@8'
collect2: ld returned 1 exit status
make[1]: *** [dist/GPIBGenericDriver.dll] Error 1
make[1]: Leaving directory `/cygdrive/c/WorkspaceHugo/GPIBDriverDLL'
make: *** [.build-impl] Error 2

Build failed. Exit value 2.

I think this is because the Gpib-32.obj is not linked.

I'm I right?
if yes, how I include an .obj in the linking with netbeans 6?




0 Kudos
Message 1 of 3
(4,071 Views)
Hi,
 
National Instruments does not provide language interfaces for Java.  However, there is a document that has links to websites that may help you.
 
 
Good luck!
 
Regards,
Rima
Rima H.
Web Product Manager
0 Kudos
Message 2 of 3
(4,045 Views)
I know that.

This is why I'm using a dll.
0 Kudos
Message 3 of 3
(4,041 Views)