This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/41128] ld: cannot find -luser32 problem



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]