> How can the linking command be improved so that the executable will be > created > under MinGW? > > gcc -g -O2 -o bison.exe LR0.o assoc.o closure.o complain.o conflicts.o > derives.o files.o getargs.o gram.o lalr.o location.o main.o muscle_tab.o > nullable.o output.o parse-gram.o print.o print_graph.o reader.o reduce.o > relation.o scan-gram.o scan-skel.o state.o symlist.o symtab.o tables.o > uniqstr.o vcg.o ../lib/libbison.a > ../lib/libbison.a(subpipe.o)(.text+0x29): In function `create_subpipe': > e:/Programme/GNU/bison-2.1/lib/subpipe.c:104: undefined reference to `pipe' > ../lib/libbison.a(subpipe.o)(.text+0x5b):e:/Programme/GNU/bison-2.1/lib/subpipe.c:104: > undefined reference to `pipe' > ../lib/libbison.a(subpipe.o)(.text+0xb1):e:/Programme/GNU/bison-2.1/lib/subpipe.c:113: > undefined reference to `fork' > collect2: ld returned 1 exit status
Please note that I do not use MinGW at all so I may be wrong completely wrong. From the error message printed by the linker it becomes clear that the MinGW library neither provides pipe() nor fork(). If this is the case then it will become impossible to compile bison with MinGW. In that case you will have to write your own version of create_subpipe() and other functions from subpipe.c from scratch. A way how these substitute functions can be implimented is shown in /djgpp/subpipe.[ch]. This is because DJGPP/MSDOS also does not provide the required functionality (pipe() and fork()). Regards, Juan M. Guerrero
