Wed, 05/18/2016 - 09:00
Hi
I try to compile OCC 7.0.0 as static libs.
I could generate and use the libs in debug configuration.
But in release configuration, building an home-made sample fails with the following errors.
Is this a known issue (i.e. OCC can not be built as static libs ?)
Thanks
Vincent
PS: the home-made sample compile fine in debug...
PPS: config= Windows 10/x64. Visual Studio 2013 SP 5. CMake 2.8.12. OCC is built with USE_D3D, USE_FREEIMAGE, USE_TBB unchecked (in the CMake gui app). 3Rd party libs are the one provided with-in the installer vc12-x64.
1>TKBRep.lib(BRepTools.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl OSD_OpenStream(class std::basic_ofstream<char,struct std::char_traits<char> > &,char const *,int)" (__imp_?OSD_OpenStream@@YAXAEAV?$basic_ofstream@DU?$char_traits@D@std@@@std@@PEBDH@Z)
1>TKBRep.lib(BRepTools.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl OSD_OpenFileBuf(class std::basic_filebuf<char,struct std::char_traits<char> > &,char const *,int)" (__imp_?OSD_OpenFileBuf@@YAXAEAV?$basic_filebuf@DU?$char_traits@D@std@@@std@@PEBDH@Z)
1>TKSTL.lib(StlAPI_Writer.obj) : error LNK2001: unresolved external symbol __imp_OSD_OpenFile
1>TKSTL.lib(RWStl.obj) : error LNK2001: unresolved external symbol __imp_OSD_OpenFile
1>TKService.lib(Image_AlienPixMap.obj) : error LNK2001: unresolved external symbol __imp_OSD_OpenFile
1>D:\Daanen\InCAS\ZZ - Studies\CSG\test_OC\succMerge\x64\Release\succMerge.exe : fatal error LNK1120: 3 unresolved externals
Wed, 05/18/2016 - 11:22
Dear Vincent,
Let me draw your attention that GNU LGPL has certain restrictions regarding static linking.
Please contact us for support and special licensing conditions.
--
Best regards,
FSR
Wed, 05/18/2016 - 11:42
Hi,
you're right, I remembered this just after I posted.
Anyway, I meet into the same troubles when building as shared libs...
V
Wed, 05/18/2016 - 14:28
I rebuilt all from scratch and it's now ok with libs built as shared..
Thu, 08/25/2016 - 16:21
FYI, I encountered this issue myself too (static x64 build with VS 2015.3) and found a fix:
https://github.com/Tridify/IfcOpenShell/commit/d6f0cfcb9380a21da467fd5d8...
https://github.com/Tridify/IfcOpenShell/commit/db5a8d12e798c2e0e9c562b93...