0022651: Impossible to build OCC as static library due to using Standard_EXPORT inste...
authorabv <abv@opencascade.com>
Thu, 15 Mar 2018 10:07:48 +0000 (13:07 +0300)
committerabv <abv@opencascade.com>
Mon, 19 Mar 2018 10:13:39 +0000 (13:13 +0300)
commit68df84780295e7a345a6ec723292532d0abc5313
tree06124d2ef7563483f4e718f0c12181435cf5081e
parent8662560e2c9c83de9ed97b522bebcad2cfc87b92
0022651: Impossible to build OCC as static library due to using Standard_EXPORT instead of Standard_API

All library-specific macros for defining export / import properties of symbols on Windows (like Standard_API, __Draw_API, _math_API etc.) are eliminated.
Common macro Standard_EXPORT is used in all places where it is necessary.

New macro OCCT_STATIC_BUILD is defined for disabling Standard_EXPORT, to be used instead of HAVE_NO_DLL, though the latter is still supported as well (for compatibility).

To allow building OCCT in static mode on Windows after these changes:
- Files OSD_WNT_1.hxx and OSD_WNT_BREAK.hxx are removed; useful declarations are moved to OSD_WNT.hxx
- In the class IVtkVTK_ShapeData, static fields ARRNAME_MESH_TYPES and ARRNAME_SUBSHAPE_IDS are converted to static inline functions
- Global array ChoixRef defined in IntImp_ComputeTangence.cxx is converted to static function returning element of the array by index
- Unused class Quantity_Convert is removed (it had static field accessed by inline method)
- Struct Approx_Data defined in the same way in BRepApprox_Approx.hxx and GeomInt_WLApprox.hxx is made private member of these classes to avoid name clash
- Some C++ files producing no object code are removed
- In NCollection_EBTree.hxx and StdLPersistent_Collectio.hxx, definition of template virtual method is moved to class definition to avoid MSVC linker warnings on unused symbols
86 files changed:
adm/cmake/occt_toolkit.cmake
adm/cmake/occt_toolkit_tool.cmake
adm/genproj.tcl
adm/templates/template.vc10
adm/templates/template.vc10x
adm/templates/template.vc7
adm/templates/template.vc7x
adm/templates/template.vc8
adm/templates/template.vc8x
adm/templates/template.vc9
adm/templates/template.vc9x
dox/dev_guides/building/cmake/cmake.md
src/AppBlend/AppBlend_AppSurf.gxx
src/AppBlend/AppBlend_Debug.cxx
src/AppCont/AppCont_ContMatrices.hxx
src/AppCont/AppCont_Function.hxx
src/ApproxInt/ApproxInt_MultiLineTool.gxx [deleted file]
src/ApproxInt/FILES
src/BOPTools/BOPTools_EdgeSet.cxx [deleted file]
src/BOPTools/FILES
src/BRepApprox/BRepApprox_Approx.hxx
src/BRepApprox/BRepApprox_TheMultiLineToolOfApprox_0.cxx [deleted file]
src/BRepApprox/FILES
src/Blend/Blend_Debug.cxx
src/Draw/Draw_Appli.hxx
src/Draw/Draw_Viewer.hxx
src/Draw/Draw_Window.hxx
src/Expr/Expr_Operators.hxx
src/ExprIntrp/ExprIntrp_Generator.cxx
src/ExprIntrp/ExprIntrp_yaccanal.hxx
src/GeomAPI/FILES
src/GeomAPI/GeomAPI_IntSS.cxx [deleted file]
src/GeomInt/GeomInt_WLApprox.hxx
src/HLRBRep/FILES
src/HLRBRep/HLRBRep_SLPropsATool.cxx [deleted file]
src/IVtkTools/IVtkTools.cxx
src/IVtkTools/IVtkTools.hxx
src/IVtkTools/IVtkTools_DisplayModeFilter.cxx
src/IVtkTools/IVtkTools_ShapeDataSource.cxx
src/IVtkTools/IVtkTools_ShapeDataSource.hxx
src/IVtkTools/IVtkTools_ShapeObject.hxx
src/IVtkTools/IVtkTools_ShapePicker.hxx
src/IVtkTools/IVtkTools_SubPolyDataFilter.cxx
src/IVtkTools/IVtkTools_SubPolyDataFilter.hxx
src/IVtkVTK/IVtkVTK_ShapeData.cxx
src/IVtkVTK/IVtkVTK_ShapeData.hxx
src/IntImp/IntImp_ComputeTangence.cxx
src/IntImp/IntImp_ComputeTangence.hxx
src/IntImp/IntImp_Int2S.gxx
src/IntWalk/IntWalk_PWalking.cxx
src/MAT2d/FILES
src/MAT2d/MAT2d_SketchExplorer.cxx [deleted file]
src/MAT2d/MAT2d_SketchExplorer.hxx [deleted file]
src/NCollection/NCollection_EBTree.hxx
src/OSD/FILES
src/OSD/OSD_Directory.cxx
src/OSD/OSD_File.cxx
src/OSD/OSD_FileNode.cxx
src/OSD/OSD_OpenFile.hxx
src/OSD/OSD_Process.cxx
src/OSD/OSD_WNT.cxx
src/OSD/OSD_WNT.hxx
src/OSD/OSD_WNT_1.hxx [deleted file]
src/OSD/OSD_WNT_BREAK.hxx [deleted file]
src/OSD/OSD_signal.cxx
src/Quantity/FILES
src/Quantity/Quantity_Convert.cxx [deleted file]
src/Quantity/Quantity_Convert.hxx [deleted file]
src/Standard/Standard_CString.hxx
src/Standard/Standard_ExtString.hxx
src/Standard/Standard_Macro.hxx
src/Standard/Standard_Real.hxx
src/Standard/Standard_ShortReal.hxx
src/Standard/Standard_math.hxx
src/StdLPersistent/StdLPersistent_Collection.cxx
src/StdLPersistent/StdLPersistent_Collection.hxx
src/StdStorage/StdStorage_MapOfTypes.hxx
src/Storage/FILES
src/Storage/Storage_stCONSTclCOM.cxx [deleted file]
src/Storage/Storage_stCONSTclCOM.hxx [deleted file]
src/TNaming/FILES
src/TNaming/TNaming_SameShapeIterator.cxx [deleted file]
src/TopClass/FILES
src/TopClass/TopClass_Intersection3d.cxx [deleted file]
src/TopClass/TopClass_Intersection3d.hxx [deleted file]
src/math/math_Recipes.hxx