Re: [Mingw-users] how to compile a win32 executable using kernel32.dll ?
- Date: Wed, 7 Nov 2007 04:46:11 -0500
- From: John Brown <johnbrown105@xxxxxxxxxxx>
- Subject: Re: [Mingw-users] how to compile a win32 executable using kernel32.dll ?
James Yu wrote:
> Hi there,
> I am trying to build a win32 executable that requires WinAPI
> provided in kernel32.dll. I tried to copy kernel32.dll to my
> working dir and my Makefile has this:
> all:
> gcc -c hello.c
> gcc -o hello hello.o -mwindows -lkernel32
> However, I always get the following error message when "make":
> $ make
> gcc -c hello.c
> gcc -o hello hello.o -mwindows -lkernel32
> hello.o:hello.c:(.text+0x79): undefined reference to `_GetProcessId'
> collect2: ld returned 1 exit status
> make: *** [all] Error 1
You need to install the w32api package.
By the way, -lkernel32 is added
automatically all the time, so you don't need to specify it. -mwindows
automatically adds -lgdi32, -luser32 and maybe others.
_________________________________________________________________
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users