[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
automake cross compile on Linux
From: |
Ken Perl |
Subject: |
automake cross compile on Linux |
Date: |
Sun, 29 Nov 2009 14:11:11 +0800 |
Hi,
I created a very simple configure.ac with autoscan for the hello wold
program, and a very simple Makefile.am,
$cat Makefile.am
bin_PROGRAMS = hello
hello_SOURCES = hello.c
I may configure; make successfully on Linux, but when I tried to build
it for win32 crossly on Linux, I have trouble, see below steps,
./configure --build i686-pc-linux-gnu --host i586-mingw32msvc
make
i586-mingw32msvc-gcc -g -O2 -o hello.exe hello.o
hello.o: In function `main':
/home/pgy/c/gtk/test/hello.c:4: undefined reference to `puts'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libmingw32.a(main.o):(.text+0x85):
undefined reference to address@hidden'
collect2: ld returned 1 exit status
make: *** [hello.exe] Error 1
$cat hello.c
#include <stdio.h>
int main(void) {
printf("Hello GNU build system\n");
return 0;
}
could anybody tell what's missing or wrong?
--
perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"address@hidden
")'
- automake cross compile on Linux,
Ken Perl <=