cygwin + mingwn + gcc 相談室 Part2
■ このスレッドは過去ログ倉庫に格納されています
0623デフォルトの名無しさん
2006/09/12(火) 14:12:40エラーメッセージは以下の通りです。
ld -o test.exe test.obj -e _main
test.obj(.text+0x21):test.c: undefined reference to `_alloca'
test.obj(.text+0x26):test.c: undefined reference to `__main'
test.obj(.text+0x32):test.c: undefined reference to `printf'
make: *** [test.exe] Error 1
ソース
#include <stdio.h>
int main(){
printf("test");
return(0);
}
makefile
make all: test.exe
test.exe: test.obj
ld -o test.exe test.obj -e _main
test.obj: test.c
gcc -o test.obj test.c -c
■ このスレッドは過去ログ倉庫に格納されています