OCC 7.0.0 as static lib

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

Forum supervisor's picture

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

Vincent Daanen's picture

Hi,

you're right, I remembered this just after I posted.

Anyway, I meet into the same troubles when building as shared libs...

V

Vincent Daanen's picture

I rebuilt all from scratch and it's now ok with libs built as shared..

Stinkfist's picture