Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems creating dll under cygwin

843829Aug 21 2008
I'm currently working on including another piece of software in a current Java application. The software is written in C and is being called by means of the Java Native Interface. Current development is on Windows XP. However I'm creating the dll file under cygwin using the -mno-cygwin command to allow the dll to be used independently of cygwin. The dll also requires GSL and libSBML. The command I'm using to compile the dll is as follows:

gcc -mno-cygwin -I/cygdrive/c/"Program Files"/Java/jdk1.5.0_14/include -I/cygdrive/c/"Program Files"/Java/jdk1.5.0_14/include/win32 -I/cygdrive/c/cygwin/usr/include -I/cygdrive/c/"Program Files"/SBML/libsbml-3.0.2-xerces/win32/include -Wl,--add-stdcall-alias -shared -o gillespie2.o gillespie2.c simulate.c meparse.c dbInput.c /cygdrive/c/"Program Files"/SBML/libsbml-3.0.2-xerces/win32/bin/*.lib /cygdrive/c/cygwin/bin/cygwin1.dll -lm -lgsl -lgslcblas -lpq

The dll file is being created without any errors being thrown. The only messages being given are automatic linking messages but these aren't errors. I don't have the windows machine on which it is being run currently so I'm not sure of the exact messages being given but they are not errors. I can get them tomorrow morning if you think they are possibly causing the problem. The problem is that when the dll is being loaded in Java the program hangs. After searching the web for possible solutions the only cause of this I can find is that there are errors in the dll file. However I cannot find out how to determine the source of these errors. I tried using the same code to created a shared object library on my mac and it worked without problems, allowing Java to load it. I wondered if anyone had an idea of how to solve this problem or possible approaches to discover the source of this problem.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2008
Added on Aug 21 2008
0 comments
183 views