Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #8076

Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64

From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64
Date 2011-09-16 06:12 -0700
Organization http://groups.google.com
Message-ID <dad64e54-77ae-4914-a53c-5124ec24caf6@glegroupsg2000goo.googlegroups.com> (permalink)
References <62e49dff-c206-4a0a-910a-9bc6c72911b0@w8g2000yqi.googlegroups.com>

Show all headers | View raw


François Rappaz wrote:
> With XP I could use the following command to successfully get a dll
> for a JNI application, from the Cygwin shell:
> g++ -w -mno-cygwin -I"$jdk/include" -I"$jdk/include/win32" -Wl,--add-
> stdcall-alias -shared -o kbhook.dll kbhook.cpp
> 
> gives a 27 KB kbhook.dll, that works ok.
> 
> With Windows 7, I have setup mingw64-x86_64gcc-g++ in my cygwin
> framework. When I run the following, from Cygwin:
> x86_64-w64-mingw32-g++ -w  -mno-cygwin -I"$jdk/include" -I"$jdk/
> include/win32" -Wl,--add-stdcall-alias -shared -o kbhook64.dll
> kbhook.cpp
> 
> I have a kbhook64.dll file which is 118 kB.
> However I still have an error when I tried to use it with my java
> program.
> 
> Exception in thread "main" java.lang.UnsatisfiedLinkError: U:\docs\OA
> \articles\z
> lib\kbhook\kbhook.dll: The specified path is invalid

Is the path valid?  What is the result of 
  ls $(cygpath 'U:\docs\OA\articles\zlib\kbhook\kbhook.dll')
?

How is the path to the DLL specified in your code?

Why do you not use forward slashes?

-- 
Lew

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Compiling a dll for 64-bits W7 with cygwin and mingw-w64 François Rappaz <rappazf@gmail.com> - 2011-09-15 05:41 -0700
  Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 Roedy Green <see_website@mindprod.com.invalid> - 2011-09-15 10:17 -0700
    Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 François Rappaz <rappazf@gmail.com> - 2011-09-16 00:18 -0700
      Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 Roedy Green <see_website@mindprod.com.invalid> - 2011-09-16 14:40 -0700
  Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 Lew <lewbloch@gmail.com> - 2011-09-16 06:12 -0700
    Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 François Rappaz <rappazf@gmail.com> - 2011-09-16 07:32 -0700
      Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 Roedy Green <see_website@mindprod.com.invalid> - 2011-09-16 14:47 -0700
      Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 Roedy Green <see_website@mindprod.com.invalid> - 2011-09-16 16:51 -0700
        Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 François Rappaz <rappazf@gmail.com> - 2011-09-22 07:04 -0700

csiph-web