看板 Programming 關於我們 聯絡資訊
請問各位該如何使用gcc編譯使用到kernel32.dll的程式(用C寫的)? 我目前的作業環境是winxp + cygwin, 程式碼中有加入#include <windows.h> 如果我單純使用MessageBox()的話編譯的過程完全沒有問題, 一旦呼叫到GetProcessID()時,編譯的時候就會出現以下錯誤訊息: $ make gcc -I. -Iinclude -o hello.exe hello.o -Wall hello.o:hello.c:(.text+0x79): undefined reference to `_GetProcessId' collect2: ld returned 1 exit status make: *** [hello.exe] Error 1 請問我該如何解決這個問題? -- ===================================== | James aka. taco -- | | War doesn't determine who's right,| | just who's left. | | Same to LIFE...?! | ===================================== -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.115.161.108