Try putting a full path to Tcl/Tk libraries with 3RDPARTY_TCL_LIBRARY / 3RDPARTY_TK_LIBRARY variables. I.e. something like this (don't know how libraries are named in your case):
This download page is for fast start, and rarely updated. It is always preferred downloading an up-to-date release from the official site of referred project, when possible.
In case of Linux, you may use libraries provided with the system itself.
04Author
Looks like I have found where is it hardcoded the version of tcl/tk - occt_csf.cmake
05Author
Thank you, Kirill for your help! I am beginner in Linux.
So, all third-parties could be used from Linux originally ?
06Commenter-1
Using libraries coming with Linux itself is the most natural way to build application for Linux. In this way libraries are truly shared among applications - which allows sparing disk space and memory utilization. This is in contrary to Windows, where each application has to install it's own copy of each used library.
As long as you are not going to make a single portable binary for multiple Linux distros (like AppImage), system library is not absent, not of incompatible version and doesn't have bugs critical to your application - it is preferred using libraries prepared by Linux distributive maintainers.
Debian-based distributives
All 3rd-party products required for building of OCCT could be installed from official repositories. You may install them from console using apt-get utility:
> sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libx11-dev libgl1-mesa-dev libfreeimage-dev
> sudo apt-get install rapidjson-dev libdraco-dev
(note that libdraco-dev, an optional library for OCCT, has been added only to the most recent versions of Ubuntu).
Other Linux distributives have different way doe installing development libraries.
07Author
Okey, I have built by original from Linux-system 3rd-parties.
Thank you, Kirill!
08Commenter-2
Hi,
I have the same problem like described in this inital post. I want to build a Visual studio 2022 solution with CMAKE. I compiled freeimage, freetype, tcl/tk and I provided the directories in cmake where to find include and lib files. Include files are recognized properly, but cmake complains about the lib files
CMake Warning at CMakeLists.txt:890 (message):
Could not find DLLs of used third-party products: 3RDPARTY_TCL_DLL_DIR
3RDPARTY_TK_DLL_DIR 3RDPARTY_FREETYPE_DLL_DIR
I also tried to set the file names (of DLL and lib files) instead of the directory name, same result.
How can I fix this? It's really frustrating because the needed files are there.
Best regards
Commenter-2
09Commenter-3
Hello,
Can you give a little more details? Which version of 3rd parties do you use? Can you share installed structure of this 3rd-parties? Just directory structure with files names.
As for VS 2022, we have full support of this version (we use this version for the developing).
I used
- FreeImage 3.18.0
- freetype 2.13.0
- tcl8.6.13
- tk8.6.13
I built all libraries with the newest VS version (17.5.4). I attached my CMAKE configuration as image. The DLL_DIR and LIB_DLL entries causes the problems. After configure finished, cmake even deletes the entries for FREETYPE_DLL_DIR and FREETYPE_LIBRARY_DIR.
but I noticed that the generate button works despite the configure errors. So I was able to create a VS solution. I "only" had to add the paths for freetype, tcl and tk in every OCC project where they are needed. A little cumbersome, but it worked out.
I don't know if this is the reason for the configure problems, but I noticed that the library names for tcl and tk weren't identical. In the created solution in the linker properties I found "tcl86.lib" and "tk86.lib". But the generated files from the TCL and TK (fresh download, I only ran the build script with no changes) are "tcl86t.lib" and "tk86t.lib". Perhaps this name mismatch is the reason that cmake doesn't found the files properly?
Best regards
Commenter-2
11Commenter-4
generated files from the TCL and TK (fresh download, I only ran the build script with no changes) are "tcl86t.lib" and "tk86t.lib". Perhaps this name mismatch is the reason that cmake doesn't found the files properly?
Surely, it is the reason. OCCT searching procedure expects normal Tcl library names as produced by MinGW and Linux makefiles. In this Tcl ticket you may find description of these awkward suffixes...
The simplest workaround is to rename libraries in your result folder. Or you may improve CMake scripts in OCCT.
Reading OCCT documentation might also help sometimes, as this particular issue is described in manual 'how to build Tcl for OCCT'.