User forums > Help
Examples
ukimiku:
I installed the latest nightly build. And reinstalled the MINGW compiler manually from scratch, into the directory "C:\MinGW". Code::Blocks runs fine, but when trying to build and run the sample Hello World console app, "ld" complains: "-luser32" was missing. When I point the toolchain executables back to another directory on C: drive which contains my formerly installed MinGW, everything works fine (except that I have to compile everything twice to see Hello World actually printed in the console window).
What is -luser32? I did a search on C: drive, and it yielded hundreds of results, but none of the filenames contained "-luser32". Strange (?)
Thanks for your patience!
By the way, no matter which MinGW is set as the default, an attempt at "Rebuild" from the "Build" menu makes "ld" complain: "cannot open output file... Permission denied." I didn't change anything between the first "Build and run" and the "Rebuild". ??
Regards
zabzonk:
-luser 32 is part of the linker command line - it is saying "link the library called libuser32.a" - this is the MinGW-supplied export library for the Windows USER32.DLL system library.
It sounds as though your installation is completely screwed up. I would delete both MinGW installations (and maybe CB as well) and start again. Install one copy of MinGW (I would use the Twilight Dragon branch) somewhere different - I put mine in a directory that includes its version number, for example C:\mingw440. Also, don't use mixed case in file or directory names - you will be thankful if you ever need to port to Linux/UNIX.
ukimiku:
Zabzonk,
thanks for thinking with me.
Actually, the compilation even of GUI projects works just fine, just as long as I accept that I have to compile every program twice (it's fast enough not to make me yawn... so what the heck... I don't really mind...), but only if I switch back to my last-but-one MinGW installation (thanks for pointing me to the case issue in path names...)
Still, the behavior looks strange to some degree.
Well, I will now go about learning some basic of c++ and the write a simple .dll project (say one that adds two numbers... :) in Code::Blocks. If it should not work out due to compiler or MinGW setup issues, I will try a reinstall. Oops, wasn't that what I just did?
Regards,
Navigation
[0] Message Index
[*] Previous page
Go to full version