Problem in building DLL : cannot find -luser32

Jim Marshall jim.marshall@wbemsolutions.com
Thu Aug 2 15:16:00 GMT 2007


syam prasad wrote:
> I installed gcc 3.4.4 and bale to compile the sources properly using
> makefiles. Problem I am facing is with DLL. When I tried to build DLL
> it is giving eerror as
> 
> /cygdrive/c/cygwin/bin/ld: cannot find -luser32
> collect2: ld returned 1 exit status
> make: *** [prog] Error 1
If you want to use the w32api libs, I believe you have to pass the 
"-mno-cygwin" option to the compiler so it builds a native Windows 
application instead of a Cygwin application.
> 
> I searched all the mailing lists and found the answer to re install
> W32app package. But I cross checked with my installed files and
> folders and found that "libuser32.a" exists.
> 
> If I copy libs in w32api to C:\cygwin\lib, DLL build is completed
> sucessfully. But facing problem with simulator. DLL is not loading
> into simulator, Simulator got hanged. My simulator lies in different
> PC ( XP/ Intel processor ). But I am able to build exe and test it
> properly.
> 
> My system configuration:
> 
> OS : Microsoft Windows XP [Version 5.1.2600]
> Processor : AMD Athlon
> GCC : gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
> 
> GCC configuration :
> 
> Reading specs from /cygdrive/c/cygwin/bin/../lib/gcc/i686-pc-cygwin/3.4.4/specs
> Configured with:
> /usr/build/package/orig/test.respin/gcc-3.4.4-3/configure --verbose
> --prefix=/usr --exec-prefix=/usr --
> sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib
> --mandir=/usr/share/man --infodir=/usr/share/info --enable-langu
> ages=c,ada,c++,d,f77,pascal,java,objc --enable-nls
> --without-included-gettext --enable-version-specific-runtime-libs --w
> ithout-x --enable-libgcj --disable-java-awt --with-system-zlib
> --enable-interpreter --disable-libgcj-debug --enable-thre
> ads=posix --enable-java-gc=boehm --disable-win32-registry
> --enable-sjlj-exceptions --enable-hash-synchronization --enabl
> e-libstdcxx-debug
> Thread model: posix
> gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
> 
> 
> Please help me in resolving this issue. Thanks in advance.
> 
> nsp
> 



More information about the Gcc-help mailing list