Archived issue #0033153
Configuration: Linker error when building from source for VS2022 x64
Description
Customer's complaint when testing 7.7.0-beta.
I get a linker error when building from source for VS2022 x64:
2>XCAFDoc_Editor.obj : error LNK2019: riferimento al simbolo esterno "public: class opencascade::handle<class XCAFNoteObjects_NoteObject> __cdecl XCAFDoc_Note::GetObject(void)const " (?GetObject@XCAFDoc_Note@@QEBA?AV?$handle@VXCAFNoteObjects_NoteObject@@@opencascade@@XZ) non risolto nella funzione "public: static bool __cdecl XCAFDoc_Editor::RescaleGeometry(class TDF_Label const &,double,bool)" (?RescaleGeometry@XCAFDoc_Editor@@SA_NAEBVTDF_Label@@N_N@Z)
I have investigated a bit. It doesn't depend on third parties, but on BUILD_WITH_PCH=ON .
Use standard generator, Visual studio 2022, x64, any configuration,
-DBUILD_WITH_FREETYPE=OFF -DBUILD_WITH_PCH=ON -DBUILD_Module_Draw=OFF
A similar problem is also observed in the TKService and TKOpenGles modules
without PCH it works good!
The problem is reproduced.
Proposed solution: turn off cotire from targets, whose compilation cause error while applying cotire tool:
TKService
TKOpenGl
TKOpenGles
TKXCAF
TKXDEDRAW
TKDFBrowser
TKMessageModel
TKMessageView
TKShapeView
TKTInspector
TKTreeModel
TKVInspector
TKView
I get a linker error when building from source for VS2022 x64:
2>XCAFDoc_Editor.obj : error LNK2019: riferimento al simbolo esterno "public: class opencascade::handle<class XCAFNoteObjects_NoteObject> __cdecl XCAFDoc_Note::GetObject(void)const " (?GetObject@XCAFDoc_Note@@QEBA?AV?$handle@VXCAFNoteObjects_NoteObject@@@opencascade@@XZ) non risolto nella funzione "public: static bool __cdecl XCAFDoc_Editor::RescaleGeometry(class TDF_Label const &,double,bool)" (?RescaleGeometry@XCAFDoc_Editor@@SA_NAEBVTDF_Label@@N_N@Z)
I have investigated a bit. It doesn't depend on third parties, but on BUILD_WITH_PCH=ON .
Use standard generator, Visual studio 2022, x64, any configuration,
-DBUILD_WITH_FREETYPE=OFF -DBUILD_WITH_PCH=ON -DBUILD_Module_Draw=OFF
A similar problem is also observed in the TKService and TKOpenGles modules
without PCH it works good!
The problem is reproduced.
Proposed solution: turn off cotire from targets, whose compilation cause error while applying cotire tool:
TKService
TKOpenGl
TKOpenGles
TKXCAF
TKXDEDRAW
TKDFBrowser
TKMessageModel
TKMessageView
TKShapeView
TKTInspector
TKTreeModel
TKVInspector
TKView
Steps to reproduce
Not required
Public activity
8 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: ddzama
Date: Fri Oct 7 09:46:27 2022 +0300
f
Author: ddzama
Date: Thu Oct 6 14:05:08 2022 +0300
0033153: Migrate to cotire 1.8.1 (from 1.7.9).
Author: ddzama
Date: Thu Oct 6 13:29:08 2022 +0300
0033153: Configuration: Linker error when building from source for VS2022 x64.
Linking error occures if applying cotire tool:
``
[revision removed]
Detailed log of new commits:
Author: ddzama
Date: Fri Oct 7 09:46:27 2022 +0300
f
Author: ddzama
Date: Thu Oct 6 14:05:08 2022 +0300
0033153: Migrate to cotire 1.8.1 (from 1.7.9).
Author: ddzama
Date: Thu Oct 6 13:29:08 2022 +0300
0033153: Configuration: Linker error when building from source for VS2022 x64.
Linking error occures if applying cotire tool:
``
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
To integrate:
occt - CR33153
products - none
occt - CR33153
products - none
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records