Sun, 12/05/2021 - 09:17
Hello Guys,
When I try to configure cmake to build Shared OCCT binaries I get this error:
CMake Error at CMakeLists.txt:763 (message):
Could not find libraries of used third-party products:
3RDPARTY_TCL_LIBRARY_DIR 3RDPARTY_TK_LIBRARY_DIR
I definitely define directories to libraries:
3RDPARTY_DIR /media/eugene/TEST/opencascade-7.5.0/3rdparty
3RDPARTY_FREETYPE_DIR /media/eugene/TEST/opencascade-7.5.0/3rdparty/freetype-2.5.5
3RDPARTY_FREETYPE_INCLUDE_DIR_ /media/eugene/TEST/opencascade-7.5.0/3rdparty/freetype-2.5.5/include
3RDPARTY_FREETYPE_INCLUDE_DIR_ /media/eugene/TEST/opencascade-7.5.0/3rdparty/freetype-2.5.5/include
3RDPARTY_FREETYPE_LIBRARY_DIR /media/eugene/TEST/opencascade-7.5.0/3rdparty/freetype-2.5.5/lib
3RDPARTY_TCL_DIR /media/eugene/TEST/opencascade-7.5.0/3rdparty/tcl8.5.0
3RDPARTY_TCL_INCLUDE_DIR /media/eugene/TEST/opencascade-7.5.0/3rdparty/tcl8.5.0/generic
3RDPARTY_TCL_LIBRARY_DIR /media/eugene/TEST/opencascade-7.5.0/3rdparty/tcl8.5.0/unix/libs/lib
3RDPARTY_TK_DIR /media/eugene/TEST/opencascade-7.5.0/3rdparty/tk8.5.0
3RDPARTY_TK_INCLUDE_DIR /media/eugene/TEST/opencascade-7.5.0/3rdparty/tk8.5.0/generic
3RDPARTY_TK_LIBRARY_DIR /media/eugene/TEST/opencascade-7.5.0/3rdparty/tk8.5.0/unix/libs/lib
What could be a problem? (Linux/Ubuntu)
Thanks.
With respects, Eugene.
Sun, 12/05/2021 - 10:59
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):
Why stil using Tcl 8.5.0, when Tcl 8.6 is available since '2012?
Sun, 12/05/2021 - 15:45
Because here 8.5 sources are placed - https://dev.opencascade.org/resources/download/3rd-party-components
Sun, 12/05/2021 - 16:21
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.
Sun, 12/05/2021 - 15:50
Looks like I have found where is it hardcoded the version of tcl/tk - occt_csf.cmake
Mon, 12/06/2021 - 11:31
Thank you, Kirill for your help! I am beginner in Linux.
So, all third-parties could be used from Linux originally ?
Mon, 12/06/2021 - 12:24
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.
In OCCT documentation you may find:
(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.
Mon, 12/06/2021 - 13:51
Okey, I have built by original from Linux-system 3rd-parties.
Thank you, Kirill!
Wed, 04/12/2023 - 18:17
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
Marco
Thu, 04/13/2023 - 01:36
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).
Supported version of 3rd parties, that you can dowload: 3rd party Components | Open CASCADE Technology. Additionally, we delivery 3rd-party with full installation of occt 7_7_0 dowloaded from Download - Open CASCADE Technology
Best regards, Dmitrii.
Thu, 04/13/2023 - 17:04
Hello,
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
Marco
Thu, 04/13/2023 - 18:11
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'.