mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
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
This commit is contained in:
@@ -19,18 +19,6 @@
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
|
||||
#ifndef __math_API
|
||||
# if defined(_WIN32) && !defined(HAVE_NO_DLL)
|
||||
# ifdef __math_DLL
|
||||
# define __math_API __declspec( dllexport )
|
||||
# else
|
||||
# define __math_API __declspec( dllimport )
|
||||
# endif /* __math_DLL */
|
||||
# else
|
||||
# define __math_API
|
||||
# endif /* _WIN32 */
|
||||
#endif /* __math_API */
|
||||
|
||||
class math_IntegerVector;
|
||||
class math_Vector;
|
||||
class math_Matrix;
|
||||
@@ -41,7 +29,7 @@ const Standard_Integer math_Status_SingularMatrix = 1;
|
||||
const Standard_Integer math_Status_ArgumentError = 2;
|
||||
const Standard_Integer math_Status_NoConvergence = 3;
|
||||
|
||||
__math_API Standard_Integer LU_Decompose(math_Matrix& a,
|
||||
Standard_EXPORT Standard_Integer LU_Decompose(math_Matrix& a,
|
||||
math_IntegerVector& indx,
|
||||
Standard_Real& d,
|
||||
Standard_Real TINY = 1.0e-20);
|
||||
@@ -52,7 +40,7 @@ __math_API Standard_Integer LU_Decompose(math_Matrix& a,
|
||||
// pivoting; d is output as +1 or -1 depending on wether the number of row
|
||||
// interchanges was even or odd.
|
||||
|
||||
__math_API Standard_Integer LU_Decompose(math_Matrix& a,
|
||||
Standard_EXPORT Standard_Integer LU_Decompose(math_Matrix& a,
|
||||
math_IntegerVector& indx,
|
||||
Standard_Real& d,
|
||||
math_Vector& vv,
|
||||
@@ -62,7 +50,7 @@ __math_API Standard_Integer LU_Decompose(math_Matrix& a,
|
||||
// used internally as a scratch area.
|
||||
|
||||
|
||||
__math_API void LU_Solve(const math_Matrix& a,
|
||||
Standard_EXPORT void LU_Solve(const math_Matrix& a,
|
||||
const math_IntegerVector& indx,
|
||||
math_Vector& b);
|
||||
|
||||
@@ -73,13 +61,13 @@ __math_API void LU_Solve(const math_Matrix& a,
|
||||
// the routine may be called sequentially with different b's.
|
||||
|
||||
|
||||
__math_API Standard_Integer LU_Invert(math_Matrix& a);
|
||||
Standard_EXPORT Standard_Integer LU_Invert(math_Matrix& a);
|
||||
|
||||
// Given a matrix a(1..n, 1..n) this routine computes its inverse. The matrix
|
||||
// a is replaced by its inverse.
|
||||
|
||||
|
||||
__math_API Standard_Integer SVD_Decompose(math_Matrix& a,
|
||||
Standard_EXPORT Standard_Integer SVD_Decompose(math_Matrix& a,
|
||||
math_Vector& w,
|
||||
math_Matrix& v);
|
||||
|
||||
@@ -91,7 +79,7 @@ __math_API Standard_Integer SVD_Decompose(math_Matrix& a,
|
||||
// zero rows.
|
||||
|
||||
|
||||
__math_API Standard_Integer SVD_Decompose(math_Matrix& a,
|
||||
Standard_EXPORT Standard_Integer SVD_Decompose(math_Matrix& a,
|
||||
math_Vector& w,
|
||||
math_Matrix& v,
|
||||
math_Vector& rv1);
|
||||
@@ -101,7 +89,7 @@ __math_API Standard_Integer SVD_Decompose(math_Matrix& a,
|
||||
// (the number of rows a(1..m, 1..n)) is used internally as a scratch area.
|
||||
|
||||
|
||||
__math_API void SVD_Solve(const math_Matrix& u,
|
||||
Standard_EXPORT void SVD_Solve(const math_Matrix& u,
|
||||
const math_Vector& w,
|
||||
const math_Matrix& v,
|
||||
const math_Vector& b,
|
||||
@@ -116,7 +104,7 @@ __math_API void SVD_Solve(const math_Matrix& u,
|
||||
|
||||
|
||||
|
||||
__math_API Standard_Integer DACTCL_Decompose(math_Vector& a, const math_IntegerVector& indx,
|
||||
Standard_EXPORT Standard_Integer DACTCL_Decompose(math_Vector& a, const math_IntegerVector& indx,
|
||||
const Standard_Real MinPivot = 1.e-20);
|
||||
|
||||
// Given a SYMMETRIC matrix a, this routine computes its
|
||||
@@ -130,7 +118,7 @@ __math_API Standard_Integer DACTCL_Decompose(math_Vector& a, const math_IntegerV
|
||||
|
||||
|
||||
|
||||
__math_API Standard_Integer DACTCL_Solve(const math_Vector& a, math_Vector& b,
|
||||
Standard_EXPORT Standard_Integer DACTCL_Solve(const math_Vector& a, math_Vector& b,
|
||||
const math_IntegerVector& indx,
|
||||
const Standard_Real MinPivot = 1.e-20);
|
||||
|
||||
@@ -141,7 +129,7 @@ __math_API Standard_Integer DACTCL_Solve(const math_Vector& a, math_Vector& b,
|
||||
|
||||
|
||||
|
||||
__math_API Standard_Integer Jacobi(math_Matrix& a, math_Vector& d, math_Matrix& v, Standard_Integer& nrot);
|
||||
Standard_EXPORT Standard_Integer Jacobi(math_Matrix& a, math_Vector& d, math_Matrix& v, Standard_Integer& nrot);
|
||||
|
||||
// Computes all eigenvalues and eigenvectors of a real symmetric matrix
|
||||
// a(1..n, 1..n). On output, elements of a above the diagonal are destroyed.
|
||||
|
Reference in New Issue
Block a user