|
From: <Fl...@t-...> - 2006-01-20 14:37:09
|
hey Keith, hey Ralf,
I'm sorry for confusing both of you...! I'm afraid, that I have the
wrong idea about how to realise my project. Let me explain, what I want
to do in a broader sense:
I want to write a rudimentary assembler software. This assembler
software shall only do things like translating a simple assembler
listing to an Opcode etc.. This software shall be executed on a windows
platform.
On the other hand I want to develop this assembler on a linux machine.
So I have deal with two challenges: writing the assembler with the help
of flex/bison AND make the programm work on windows. Because of this I
first tried to compile a simple "Hello-World" Application on my linux
machine with Mingw32 to achieve a console application for windows. After
that, I thought; "ok, let's try this with an source code file produced
by flex". And voila, there occured the problems. It was not possible to
include the flex source file, because the lib (libfl.a) was generated
for the linux platform and not for windows. Since then, I tried to
generate a "windows-compatible" libfl.a and flex-programme, but it
didn't work. To make it absolutely clear: I don't want to have a
flex.exe application. I just want to use flex on a linux machine, but
include the generated source code then to feed my "cross-compiler", that
means i586-mingw32msvc-gcc.
I hope this explanation was understandable now. The reason why I want to
develop on a linux machine although the target machine is a windows one
is, that I want to use QT later to generate a GUI. But this shall be
step 2.
I hope my idea is correct and realizable. If not, please tell me.
Anyway, I tried the way you explained to me with
--build=i686-pc-linux-gnu and --host=i586-mingw32msvc. The ./configure
was OK, and it said:
checking whether we are cross compiling... yes
But when I called "make", it aborted soon...here the log:
make all-recursive
make[1]: Entering directory `/hd/downloads/mingw32source/objdir'
Making all in .
make[2]: Entering directory `/hd/downloads/mingw32source/objdir'
if i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I../flex-2.5.31 -I.
-DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include
-I../flex-2.5.31/intl -g -O2 -MT libmain.o -MD -MP -MF
".deps/libmain.Tpo" \
-c -o libmain.o `test -f '../flex-2.5.31/libmain.c' || echo
'../flex-2.5.31/'`../flex-2.5.31/libmain.c; \
then mv ".deps/libmain.Tpo" ".deps/libmain.Po"; \
else rm -f ".deps/libmain.Tpo"; exit 1; \
fi
if i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I../flex-2.5.31 -I.
-DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include
-I../flex-2.5.31/intl -g -O2 -MT libyywrap.o -MD -MP -MF
".deps/libyywrap.Tpo" \
-c -o libyywrap.o `test -f '../flex-2.5.31/libyywrap.c' || echo
'../flex-2.5.31/'`../flex-2.5.31/libyywrap.c; \
then mv ".deps/libyywrap.Tpo" ".deps/libyywrap.Po"; \
else rm -f ".deps/libyywrap.Tpo"; exit 1; \
fi
rm -f libfl.a
ar cru libfl.a libmain.o libyywrap.o
i586-mingw32msvc-ranlib libfl.a
if i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I../flex-2.5.31 -I.
-DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include
-I../flex-2.5.31/intl -g -O2 -MT ccl.o -MD -MP -MF ".deps/ccl.Tpo" \
-c -o ccl.o `test -f '../flex-2.5.31/ccl.c' || echo
'../flex-2.5.31/'`../flex-2.5.31/ccl.c; \
then mv ".deps/ccl.Tpo" ".deps/ccl.Po"; \
else rm -f ".deps/ccl.Tpo"; exit 1; \
fi
In file included from ../flex-2.5.31/ccl.c:34:
../flex-2.5.31/flexdef.h:73:19: regex.h: Datei oder Verzeichnis nicht
gefunden
../flex-2.5.31/flexdef.h:205:1: warning: "INFINITY" redefined
In file included from ../flex-2.5.31/flexdef.h:49,
from ../flex-2.5.31/ccl.c:34:
/usr/lib/gcc/i586-mingw32msvc/3.4.2/../../../../i586-mingw32msvc/include/math.h:289:1:
warning: this is the location of the previous definition
In file included from ../flex-2.5.31/ccl.c:34:
../flex-2.5.31/flexdef.h:1173: error: syntax error before
"regex_linedir"
../flex-2.5.31/flexdef.h:1173: warning: data definition has no type or
storage class
../flex-2.5.31/flexdef.h:1175: error: syntax error before '*' token
../flex-2.5.31/flexdef.h:1176: error: syntax error before '*' token
../flex-2.5.31/flexdef.h:1177: error: syntax error before '*' token
../flex-2.5.31/flexdef.h:1178: error: syntax error before '*' token
../flex-2.5.31/flexdef.h:1179: error: syntax error before '*' token
../flex-2.5.31/flexdef.h:1180: error: syntax error before '*' token
make[2]: *** [ccl.o] Fehler 1
make[2]: Leaving directory `/hd/downloads/mingw32source/objdir'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/hd/downloads/mingw32source/objdir'
make: *** [all] Fehler 2
root@acampc6:/hd/downloads/mingw32source/objdir#
Hope this is not further confusing and saying "thanks again"...
R@lf
|