]> OCCT Git - occt.git/commit
0033153: Configuration: Linker error when building from source for VS2022 x64.
authorddzama <ddzama@opencascade.com>
Thu, 6 Oct 2022 10:29:08 +0000 (13:29 +0300)
committersmoskvin <smoskvin@opencascade.com>
Mon, 31 Oct 2022 15:16:19 +0000 (18:16 +0300)
commit3536158f113a003f983ad18556369e38b9297eaa
tree13ca5f6f1a714d491e8de15ef483d37e7a422dd1
parentcb77bfc4f0181e4a8ab503933bd83510fc345eb1
0033153: Configuration: Linker error when building from source for VS2022 x64.

With enabled flag BUILD_USE_PCH we get an error of compilation of TKService:

1>Image_VideoRecorder.obj :
  error LNK2019:
    unresolved external symbol
      "int __cdecl av_strerror(int,char *,unsigned __int64)"
      (?av_strerror@@YAHHPEAD_K@Z) referenced in function
      "protected: class TCollection_AsciiString __cdecl Image_VideoRecorder::formatAvError(int)const "
      (?formatAvError@Image_VideoRecorder@@IEBA?AVTCollection_AsciiString@@H@Z)
1>Media_FormatContext.obj :
  error LNK2001:
    unresolved external symbol
      "int __cdecl av_strerror(int,char *,unsigned __int64)" (?av_strerror@@YAHHPEAD_K@Z)

And many other similar errors. Similar errors occures in some other projects too:

TKService
TKOpenGl
TKOpenGles
TKXCAF
TKXDEDRAW
TKDFBrowser
TKMessageModel
TKMessageView
TKShapeView
TKTInspector
TKTreeModel
TKVInspector
TKView

Proposed solution: turn off cotire from targets, whose compilation cause error while applying cotire tool.
In this ticket migration to cotire 1.8.1 (from 1.7.9) is done.

COTIRE_PREFIX_HEADER_IGNORE_PATH does not apply here, because its employing
causes some errors in 3rdparty libraries (for example, in TKService project).

Projects (TKDFBrowser TKMessageModel TKMessageView TKShapeView TKTInspector TKTreeModel TKVInspector TKView)
which use Qt may be proceeded by cotire tool, but after fixing a bug of cotire:

https://gitlab.kitware.com/cmake/cmake/-/issues/18353

0033153: Fix cotire bug, causing impossibility of compilation targets depending from Qt.

Solution is proposed in:
https://gitlab.kitware.com/cmake/cmake/-/issues/18353
15 files changed:
adm/cmake/cotire.cmake
adm/cmake/occt_toolkit.cmake
src/TKOpenGl/CMakeLists.txt
src/TKOpenGles/CMakeLists.txt
src/TKService/CMakeLists.txt
src/TKXCAF/CMakeLists.txt
src/TKXDEDRAW/CMakeLists.txt
tools/TKDFBrowser/CMakeLists.txt
tools/TKMessageModel/CMakeLists.txt
tools/TKMessageView/CMakeLists.txt
tools/TKShapeView/CMakeLists.txt
tools/TKTInspector/CMakeLists.txt
tools/TKTreeModel/CMakeLists.txt
tools/TKVInspector/CMakeLists.txt
tools/TKView/CMakeLists.txt