
Mon, 12/28/2020 - 19:31
I have tried to compile OpenCascade on Win10 64bit, using VS2017. I compiled on 64bit, but I encounter a link errors, one of them is:
1>------ Build started: Project: TKDraw, Configuration: Debug x64 ------
1>LINK : fatal error LNK1104: cannot open file 'tcl86.lib'
========== Build: 0 succeeded, 9 failed, 50 up-to-date, 1 skipped ==========
I noticed that in project TKDraw, I have the following link settings:
..\..\win64\vc14\libd\TKMesh.lib
..\..\win64\vc14\libd\TKService.lib
..\..\win64\vc14\libd\TKHLR.lib
C:\ActiveTcl\lib\tcl86t.lib
C:\ActiveTcl\lib\tk86t.lib
gdi32.lib
advapi32.lib
user32.lib
shell32.lib
..\..\win64\vc14\libd\TKShHealing.lib
opengl32.lib
windowscodecs.lib
C:\Program Files\freetype\lib\freetyped.lib
winmm.lib
..\..\win64\vc14\libd\TKTopAlgo.lib
..\..\win64\vc14\libd\TKGeomAlgo.lib
..\..\win64\vc14\libd\TKBRep.lib
..\..\win64\vc14\libd\TKGeomBase.lib
..\..\win64\vc14\libd\TKG3d.lib
..\..\win64\vc14\libd\TKG2d.lib
..\..\win64\vc14\libd\TKMath.lib
..\..\win64\vc14\libd\TKernel.lib
As you see, none of them tell me about tcl86.lib, but the compiler say that this lib is missing. Why ? Moreover, I didn't found any tcl86.lib in opencascade folder, so, why is asking me about this file ? Can you help me a little bit ?
Mon, 12/28/2020 - 20:08
This is because Visual Studio C++ compiler has a "#pragma lib" feature allowing to add library dependencies directly in C++ code, see src/Draw/Draw.cxx:
Apparently, your Tcl build has an extra suffix "t" in a file name "tcl86t.lib", so that linker is unable to find "tcl86.lib".
Solutions: