public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/41128] New: ld: cannot find -luser32 problem
@ 2009-08-20 3:10 justineuro at yahoo dot com
2009-08-20 4:43 ` [Bug c/41128] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: justineuro at yahoo dot com @ 2009-08-20 3:10 UTC (permalink / raw)
To: gcc-bugs
The command line input
$ gcc max_memory.c -o max_memory.exe
currently gives
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot
find -luser32
collect2: ld returned 1 exit status
The command worked fine initially. Any suggestion as to correcting error would
be greatly appreciated. Thanks in advance!
More info as suggested in guidelines for bug reports:
===START INFO====
$ gcc -v -save-temps max_memory.c
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /managed/gcc-build/final-v3-bootstrap/gcc-3.4.4-999/configure
--verbose --prog
ram-suffix=-3 --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc
--libdir=/usr/lib --libexecdir
=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-languages=c,ada,c++,d,f77,
pascal,java,objc --enable-nls --without-included-gettext
--enable-version-specific-runtime-libs
--without-x --enable-libgcj --disable-java-awt --with-system-zlib
--enable-interpreter --disab
le-libgcj-debug --enable-threads=posix --enable-java-gc=boehm
--disable-win32-registry --enable
-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
/usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1.exe -E -quiet -v -D__CYGWIN32__
-D__CYGWIN__ -Dunix -D__
unix__ -D__unix -idirafter
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api -idiraf
ter
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/lib/../../include/w32api
max_m
emory.c -mtune=pentiumpro -o max_memory.i
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/in
clude"
ignoring duplicate directory
"/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/lib/
../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include
/usr/include
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api
End of search list.
/usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1.exe -fpreprocessed max_memory.i -quiet
-dumpbase max_mem
ory.c -mtune=pentiumpro -auxbase max_memory -version -o max_memory.s
GNU C version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
(i686-pc-cygwin)
compiled by GNU C version 3.4.4 (cygming special, gdc 0.12, using dmd
0.125).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=65464
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe -o
max_memory.o max_me
mory.s
/usr/lib/gcc/i686-pc-cygwin/3.4.4/collect2.exe -Bdynamic
--dll-search-prefix=cyg /usr/lib/gcc/
i686-pc-cygwin/3.4.4/../../../crt0.o -L/usr/lib/gcc/i686-pc-cygwin/3.4.4
-L/usr/lib/gcc/i686-pc
-cygwin/3.4.4 -L/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../.. max_memory.o -lgcc
-lcygwin -luser32
-lkernel32 -ladvapi32 -lshell32 -lgcc
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot
find -luser32
collect2: ld returned 1 exit status
===END INFO===
--
Summary: ld: cannot find -luser32 problem
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: justineuro at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41128
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/41128] ld: cannot find -luser32 problem
2009-08-20 3:10 [Bug c/41128] New: ld: cannot find -luser32 problem justineuro at yahoo dot com
@ 2009-08-20 4:43 ` pinskia at gcc dot gnu dot org
2009-08-31 0:09 ` justineuro at yahoo dot com
2009-08-31 1:16 ` justineuro at yahoo dot com
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-08-20 4:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2009-08-20 04:42 -------
This is a bug in your installation of GCC and cygwin.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
Summary|ld: cannot find -luser32 |ld: cannot find -luser32
|problem |problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41128
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/41128] ld: cannot find -luser32 problem
2009-08-20 3:10 [Bug c/41128] New: ld: cannot find -luser32 problem justineuro at yahoo dot com
2009-08-20 4:43 ` [Bug c/41128] " pinskia at gcc dot gnu dot org
@ 2009-08-31 0:09 ` justineuro at yahoo dot com
2009-08-31 1:16 ` justineuro at yahoo dot com
2 siblings, 0 replies; 4+ messages in thread
From: justineuro at yahoo dot com @ 2009-08-31 0:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from justineuro at yahoo dot com 2009-08-31 00:09 -------
(In reply to comment #1)
> This is a bug in your installation of GCC and cygwin.
Thanks for the reply. I have since re-installed and subsequently got an
"undefined reference to _WinMain@16' error". It turns out I had to add the
-shared option, i.e., use the command line "gcc -shared -o file.exe file.c". I
got this solution from url:
http://forums.sun.com/thread.jspa?threadID=5305805&messageID=10359759. All is
fine now. Again thanks!
Justine
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41128
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/41128] ld: cannot find -luser32 problem
2009-08-20 3:10 [Bug c/41128] New: ld: cannot find -luser32 problem justineuro at yahoo dot com
2009-08-20 4:43 ` [Bug c/41128] " pinskia at gcc dot gnu dot org
2009-08-31 0:09 ` justineuro at yahoo dot com
@ 2009-08-31 1:16 ` justineuro at yahoo dot com
2 siblings, 0 replies; 4+ messages in thread
From: justineuro at yahoo dot com @ 2009-08-31 1:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from justineuro at yahoo dot com 2009-08-31 01:16 -------
(In reply to comment #2)
> (In reply to comment #1)
> > This is a bug in your installation of GCC and cygwin.
> Thanks for the reply. I have since re-installed and subsequently got an
> "undefined reference to _WinMain@16' error". It turns out I had to add the
> -shared option, i.e., use the command line "gcc -shared -o file.exe file.c". I
> got this solution from url:
> http://forums.sun.com/thread.jspa?threadID=5305805&messageID=10359759. All is
> fine now. Again thanks!
>
> Justine
Make sure you use the option -shared and ***NOT*** -share. The -share option
when used in a windows command prompt shell in my machine ERASES the existing
*.exe files of the same name!!! However, it does give a message to the effect
that -share is not a valid option. ---Justine
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41128
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-31 1:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-20 3:10 [Bug c/41128] New: ld: cannot find -luser32 problem justineuro at yahoo dot com
2009-08-20 4:43 ` [Bug c/41128] " pinskia at gcc dot gnu dot org
2009-08-31 0:09 ` justineuro at yahoo dot com
2009-08-31 1:16 ` justineuro at yahoo dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).