[cfe-dev] Compiling a simple Win32 program

Csaba Raduly rcsaba at gmail.com
Wed Jun 6 04:05:43 PDT 2012

Hi Cesar,

On Wed, Jun 6, 2012 at 12:54 PM, Cesar Mello  wrote:
> Hi!
> I've tried to compile this simple program:
> #include <windows.h>
> int main()
> {
> ::MessageBoxW(NULL, L"Test!", L"Test!", MB_OK);
> return 0;
> }
> It compiles nicely, but fails to link. Please can you tell me how to specify
> user32 and gdi32 libraries for the linker? Sorry if I'm being too newbie.

Unfortunately, you did not supply enough information to allow
diagnosing your problem.

* Which clang is it? What is the output of "clang -v"? Where did you
get it? Was it built with MS VC or MinGW?
* What was the compilation command?
* What was the error message?

GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

More information about the cfe-dev mailing list