From: RAPPAZ F. <fra...@un...> - 2011-09-20 06:14:59
|
Yes, that does not work, on W7, to have a dll usable with java 64 bits: jdk='/cygdrive/c/Program Files/Java/Jdk1.7.0' x86_64-w64-mingw32-g++ -w -mno-cygwin -I"$jdk/include" -I"$jdk/include/win32" -Wl,--add-stdcall-alias -shared -o kbhook.dll kbhook.cpp It does produce a file without error message, but the java VM complains that it can't use it. On Windows XP these compilation was ok jdk='/cygdrive/c/Program Files/Java/Jdk1.6.0_24' g++ -w -mno-cygwin -I"$jdk/include" -I"$jdk/include/win32" -Wl,--add-stdcall-alias -shared -o kbhook.dll kbhook.cpp Francois -----Original Message----- From: NightStrike [mailto:nig...@gm...] Sent: lundi, 19. septembre 2011 15:46 To: min...@li...; RAPPAZ Francois; Kai Tietz Subject: Re: [Mingw-w64-public] Compiling a dll for JNI and java 64 bits Still having problems? On Fri, Sep 16, 2011 at 4:31 AM, RAPPAZ Francois <fra...@un...> wrote: > Kay, > > Yes I was meaning Windows 7 sorry. > > >From the control panel, system, I see that I have Windows 7 Enterprise, 64 Bit operating system. > > Francois > > > -----Original Message----- > From: Kai Tietz [mailto:kti...@go...] > Sent: vendredi, 16. septembre 2011 10:15 > To: min...@li... > Subject: Re: [Mingw-w64-public] Compiling a dll for JNI and java 64 > bits > > 2011/9/16 RAPPAZ Francois <fra...@un...>: >> I have a application that use a dll with Java native interface. Under >> windows XP, using Cygwin, that 2 lines >> >> jdk='/cygdrive/c/Program Files/Java/Jdk1.6.0_24' >> g++ -w -mno-cygwin -I"$jdk/include" -I"$jdk/include/win32" >> g++ -Wl,--add-stdcall-alias -shared -o kbhook.dll kbhook.cpp >> >> gaved a 27 KB kbhook.dll, that was ok. >> >> I'm not with Windows 6 and I need to recompile my code to have a >> 64Bit dll, and I tried this >> >> jdk='/cygdrive/c/Program Files/Java/Jdk1.7.0' >> x86_64-w64-mingw32-g++ -w -mno-cygwin -I"$jdk/include" >> -I"$jdk/include/win32" -Wl,--add-stdcall-alias -shared -o kbhook.dll >> kbhook.cpp >> >> which produced a kbhook.dll file which is 118 kB >> >> Unfortunatly I still get an error >> Exception in thread "main" java.lang.UnsatisfiedLinkError: U:\docs\OA\articles\zlib\kbhook\kbhook.dll: The specified path is invalid. >> java -v says java version "1.7.0" Java(TM) SE Runtime Environment >> (build 1.7.0-b147) Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, >> mixed mode) >> >> Does anyone have a clue on this ? >> Thanks >> >> François > > Hello François, > > first what you mean by Windows 6? You mean Windows 7, right? > Second question, do you use a 64-bit windows to execute, or are you working on a 32-bit one? > > Regards, > Kai > > ---------------------------------------------------------------------- > -------- BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, > CA > http://p.sf.net/sfu/rim-devcon-copy2 > _______________________________________________ > Mingw-w64-public mailing list > Min...@li... > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > > ---------------------------------------------------------------------- > -------- BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, > CA > http://p.sf.net/sfu/rim-devcon-copy2 > _______________________________________________ > Mingw-w64-public mailing list > Min...@li... > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > |