0027197: Configuration - fix compilation issues when using mingw
authorkgv <kgv@opencascade.com>
Sat, 27 Feb 2016 23:07:27 +0000 (02:07 +0300)
committerabv <abv@opencascade.com>
Fri, 4 Mar 2016 04:31:05 +0000 (07:31 +0300)
commit7c65581dd3cd34554ff030dee53e6a00856916a5
tree81770464b38253499862bab60476c997e504687a
parent8582eb08ccad3c8b4bff88ed107350f5858f12f9
0027197: Configuration - fix compilation issues when using mingw

AIS_ColorScale, AIS_Dimension - the protected method DrawText()
has been renamed to drawText() to avoid name collisions with macros.

_MSC_VER/_WIN32 misuse has been fixed in several places.
Header <malloc.h> is now included where alloca() is used.
Draw_Window - dllimport flag has been dropped from inline methods.

TKernel - mandatory dependencies Winspool.lib and Psapi.lib
are now linked explicitly (instead of msvc-specific pragma syntax).

CMake scripts - the option -std=c++0x has been replaced by -std=gnu++0x
for mingw to allow extensions (like _wfopen() and others).
The minimum Windows version has been set to _WIN32_WINNT=0x0501.
Invalid options "-z defs" and "-lm" have been dropped for mingw.
Flag --export-all-symbols has been added to CMAKE_SHARED_LINKER_FLAGS
to workaround missing vtable symbols when using mingw.
FreeType is now linked explicitly on Windows.

Draw::Load() - "lib" suffix is now prepended on mingw as well.

Drop redundant declaration of _TINT from OSD_WNT_1.hxx.
NCollection_UtfString::FromLocale() - platform-specific code has been moved to .cxx file.
Draw_BasicCommands - fixed incorrect mingw64 version macros.

genproj, cbp - added workaround for process argument list limits on Windows.
TKSTEP linkage is failing on this platform due to too long list of files.
The list of object files to link is now stored in dedicated file which is passed to gcc.

Option "-z defs" removed from CMake linker options to avoid problems when building with different configurations of VTK on Linux

Some MinGW-specific compiler warnings (potentially uninitialized vars, use of NULL, parentheses in conditional expressions) are fixed (speculatively)
69 files changed:
adm/cmake/occt_csf.cmake
adm/cmake/occt_defs_flags.cmake
adm/genproj.tcl
adm/templates/codeblocks.bat [new file with mode: 0644]
adm/templates/env.bat
src/AIS/AIS_AngleDimension.cxx
src/AIS/AIS_ColorScale.cxx
src/AIS/AIS_ColorScale.hxx
src/AIS/AIS_Dimension.cxx
src/AIS/AIS_Dimension.hxx
src/BRepAlgo/BRepAlgo_DSAccess.cxx
src/BSplCLib/BSplCLib.cxx
src/CDF/CDF_FWOSDriver.cxx
src/Dico/Dico_Dictionary.gxx
src/Draw/CommandWindow.cxx
src/Draw/Draw.cxx
src/Draw/DrawRessource.h
src/Draw/Draw_BasicCommands.cxx
src/Draw/Draw_Interpretor.cxx
src/Draw/Draw_Main.cxx
src/Draw/Draw_Window.cxx
src/Draw/Draw_Window.hxx
src/DrawTrSurf/DrawTrSurf.cxx
src/DrawTrSurf/DrawTrSurf_Point.cxx
src/FSD/FSD_File.cxx
src/HLRBRep/HLRBRep_PolyAlgo.cxx
src/IntAna/IntAna_Curve.cxx
src/MeshVS/MeshVS_MeshPrsBuilder.cxx
src/Message/Message_PrinterOStream.cxx
src/MoniTool/MoniTool_TypedValue.cxx
src/NCollection/FILES
src/NCollection/NCollection_UtfString.cxx [new file with mode: 0644]
src/NCollection/NCollection_UtfString.lxx
src/NCollection/NCollection_WinHeapAllocator.cxx
src/OSD/OSD_DirectoryIterator.cxx
src/OSD/OSD_File.cxx
src/OSD/OSD_File.hxx
src/OSD/OSD_FileIterator.cxx
src/OSD/OSD_Host.cxx
src/OSD/OSD_MemInfo.cxx
src/OSD/OSD_OpenFile.cxx
src/OSD/OSD_Path.cxx
src/OSD/OSD_Process.cxx
src/OSD/OSD_WNT_1.hxx
src/OSD/OSD_signal_WNT.cxx
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_ShaderObject.cxx
src/OpenGl/OpenGl_ShaderProgram.cxx
src/PCDM/PCDM_ReferenceIterator.cxx
src/QABugs/QABugs_11.cxx
src/Standard/Standard.cxx
src/Standard/Standard_Assert.hxx
src/Standard/Standard_CLocaleSentry.cxx
src/Standard/Standard_CLocaleSentry.hxx
src/Standard/Standard_CString.cxx
src/Standard/Standard_values.h
src/TCollection/TCollection_AsciiString.cxx
src/TCollection/TCollection_ExtendedString.cxx
src/TKD3DHost/EXTERNLIB
src/TKernel/EXTERNLIB
src/TopOpeBRepBuild/TopOpeBRepBuild_GIter.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.cxx
src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx
src/V3d/V3d_View_Print.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/WNT/WNT_WClass.cxx
src/WNT/WNT_Window.cxx
src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx