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?