开发者

\mingw32\bin\ld.exe: cannot find -lC:/msys/1.0/opt/tcl/lib

开发者 https://www.devze.com 2023-02-16 15:04 出处:网络
I am attempting to compile a simulator for Y86 code (http://csapp.cs.cmu.edu/public/sim.tar) on Windows using mingw and msys, the simulator uses Tcl and Tk for a GUI that it has, so I first tried down

I am attempting to compile a simulator for Y86 code (http://csapp.cs.cmu.edu/public/sim.tar) on Windows using mingw and msys, the simulator uses Tcl and Tk for a GUI that it has, so I first tried downloading the needed includes and libs for Tcl and Tk to build with, that didn't work, so I downloaded the source and built them in msys (http://开发者_JAVA百科wiki.tcl.tk/14828).

The issue I am having is that I keep getting the same error when running the make file,

chrismeyer@MEYER-C /src/sim

$ make

(cd misc; make all) make[1]: Entering directory /src/sim/misc' make[1]: Nothing to be done forall'. make[1]: Leaving directory /src/sim/misc' (cd pipe; make all GUIMODE=-DHAS_GUI TKLIBS="-l /opt/tcl/lib" TKINC="-I /opt/tcl/include") make[1]: Entering directory/src/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 /opt/tcl/include -I../misc -DHAS_GUI -o psim psim.c pipe-std.c \ ../misc/isa.c -l /opt/tcl/lib -lm c:\minGW\bin..\lib\gcc\mingw32\3.4.5........\mingw32\bin\ld.exe: cannot find -lC:/msys/1.0/opt/tcl/lib collect2: ld returned 1 exit status make[1]: * [psim] Error 1 make[1]: Leaving directory `/src/sim/pipe'

Sorry about the formatting of the error, it got messed up a little bit. The main problem is this line

C:\minGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lC:/msys/1.0/opt/tcl/lib

I am unsure why gcc cannot find the lib directory, it exists, I have checked many times.

Any insight into this issue would be very helpful!

Thanks!


After taking a short look at the Makefiles in the sim.tar distro i would say your variables are not setup properly.

Try the following settings in your Makefile:

TKLIB="-L/opt/tcl/lib -ltk -ltcl"
TKINC="-I/opt/tcl/include"

Depending on the exact libs you have you might need to add some version numbers like -ltcl85 or so, but try without first.

0

精彩评论

暂无评论...
验证码 换一张
取 消