Web lists-archives.org

Re: [Mingw-users] how to compile a win32 executable using kernel32.dll ?





You want to like against an appropriate MinGW32 win32 library not the dll.
 
Aaron
----- Original Message -----
From: James Yu
Sent: Wednesday, November 07, 2007 9:16 AM
Subject: [Mingw-users] how to compile a win32 executable using kernel32.dll ?

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
I have no idea what went wrong and appreciate whoever kind enough to show me the way to get out of this mess :-)

--
This is a UTF-8 formatted mail
-----------------------------------------------
James C.-C.Yu
 


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