一. Y86-64模拟器的安装
我是参照这位博主的文章安装的模拟器安装,想安装GUI版本的,到了第五步编译的过程中出现了对'matherr'未定义引用的错误.
二. 解决问题,编译GUI界面
进入sim目录:cd sim
输入make clean; make
1.编译时出现错误,make后输出的信息如下
(cd misc; make all)
make[1]: 进入目录“/home/dragon/sim/misc”
gcc -Wall -O1 -g -c yis.c
gcc -Wall -O1 -g -c isa.c
gcc -Wall -O1 -g yis.o isa.o -o yis
gcc -Wall -O1 -g -c yas.c
flex yas-grammar.lex
mv lex.yy.c yas-grammar.c
gcc -O1 -c yas-grammar.c
gcc -Wall -O1 -g yas-grammar.o yas.o isa.o -lfl -o yas
bison -d hcl.y
flex hcl.lex
gcc -O1 node.c lex.yy.c hcl.tab.c outgen.c -o hcl2c
make[1]: 离开目录“/home/dragon/sim/misc”
(cd pipe; make all GUIMODE=-DHAS_GUI TKLIBS="-L/usr/lib/x86_64-linux-gun/ -ltk8.5 -ltcl8.5" TKINC="-I/usr/include/tcl8.5")
make[1]: 进入目录“/home/dragon/sim/pipe”
# Building the pipe-std.hcl version of PIPE
../misc/hcl2c -n pipe-std.hcl < pipe-std.hcl > pipe-std.c
gcc -Wall -O2 -I/usr/include/tcl8.5 -I../misc -DHAS_GUI -o psim psim.c pipe-std.c \
../misc/isa.c -L/usr/lib/x86_64-linux-gun/ -ltk8.5 -ltcl8.5 -lm
/tmp/ccuL1R7t.o:(.data.rel+0x0):对‘matherr’未定义的引用
collect2: error: ld returned 1 exit status
Makefile:42: recipe for target 'psim' failed
make[1]: *** [psim] Error 1
make[1]: 离开目录“/home/dragon/sim/pipe”
Makefile:27: recipe for target 'all' failed
make: *** [all] Error 2<