Thanks! Indeed, using gendef works and I get a lot of exports from the dll! I also checked dlltool from mingw-w64 and it does not export anything, so gendef seems to be the way to go! Thanks again!
On 19.08.2016 20:32, The Canadian Bacon wrote: > I'm not an msys2 dev but have you tried running the tool gendef on the DLL > itself and see what's there? Should be in the mingw tools package. > > On Aug 19, 2016 2:01 PM, "Mario Emmenlauer" <ma...@emmenlauer.de> wrote: > >> >> Dear MinGW-w64 developers, >> >> I'm using MSYS2 dlltool on a dll from Oracle Java 1.8 x64: jvm.dll. >> Using dlltool finds no symbols. I reported this to MSYS2 team, and >> got a very quick response from David Macek: It seems `nm` and >> `dlltool` don't recognize exports in non-mingw libraries. `objdump` >> recognizes it. >> >> Could you please help me (and the MSYS2 team) by clarifying if this >> is expected behavior or a known bug, or if the fault lies in the MSYS2 >> builds? >> >> Below my original report, for your reference. >> >> Thanks a lot and all the best, >> >> Mario >> >> >> >> ---- >> >> I need to compile a Python 2 extension called 'javabridge' that >> links against the Oracle JVM. The compile fails with undefined >> symbols: >> >> C:\msys2\mingw64\bin/x86_64-w64-mingw32-gcc.exe -shared >> -Wl,--enable-auto-image-base -pipe -s -s build/temp.mingw-2.7/_ >> javabridge.o >> build/temp.mingw-2.7/_javabridge_nomac.o build/temp.mingw-2.7/_ >> javabridge.def >> -Lc:/users/emmenlau/appdata/local/temp/pip-build-rnax5q/javabridge >> "-LC:\Program >> Files\Java\jdk1.8.0_101/lib" -LC:/msys2/mingw64/lib/python2.7/config >> -LC:/msys2/mingw64/lib -ljvm -lpython2.7 -o >> build/lib.mingw-2.7/javabridge/_javabridge.pyd >> >> build/temp.mingw-2.7/_javabridge.o:_javabridge.c:(.text+0xda3): >> undefined >> reference to `__imp_StopVM' >> >> build/temp.mingw-2.7/_javabridge.o:_javabridge.c:(.text+0x1f4aa): >> undefined >> reference to `__imp_CreateJavaVM' >> >> build/temp.mingw-2.7/_javabridge_nomac.o:_javabridge_nomac.c:(.text+ >> 0x103): >> undefined reference to `__imp_JNI_CreateJavaVM' >> >> collect2.exe: error: ld returned 1 exit status >> >> error: command 'C:\\msys2\\mingw64\\bin/x86_64-w64-mingw32-gcc.exe' >> failed >> with exit status 1 >> >> >> I want to debug the issue and check that the def-file is correct. >> So I try to run dlltool on jvm.dll, but it says "no symbols". How >> does that make sense? Its the official Oracle Java JVM 1.8.0_101, >> the dll must have symbols? Here is what I tried: >> >> #> dlltool -z /tmp/somedll.def --export-all-symbol '/c/Program >> Files/Java/jdk1.8.0_101/jre/bin/server/jvm.dll' >> >> C:\msys2\mingw64\bin\dlltool.exe: C:/Program >> Files/Java/jdk1.8.0_101/jre/bin/server/jvm.dll: no symbols >> >> Indeed the generated def-file has only a header, no symbols. >> Can you please suggest what I'm doing wrong? I'm on the mingw64 >> MSYS2 shell and its 64bit Java. >> >> Thanks a lot, >> >> Mario ------------------------------------------------------------------------------ _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public