MSYS2 Mingw64 compilation. Compilation successful considering everything but the following:

- IFC4 (only IFC2x3 tried; should work)
- VLD
- IfcMax
- shared libraries
This commit is contained in:
Fredounet
2016-05-29 17:58:03 +01:00
parent ccb24948df
commit 3b169219af
4 changed files with 29 additions and 5 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ IF(UNICODE_SUPPORT)
MESSAGE(STATUS "ICU libraries found") MESSAGE(STATUS "ICU libraries found")
# NOTE icudata appears to be icudt on Windows/MSVC and icudata on others # NOTE icudata appears to be icudt on Windows/MSVC and icudata on others
# dl is included to resolve dlopen and friends symbols # dl is included to resolve dlopen and friends symbols
IF(MSVC) IF(MSVC OR MINGW)
SET(ICU_LIBRARIES icuuc icudt) SET(ICU_LIBRARIES icuuc icudt)
ADD_DEBUG_VARIANTS(ICU_LIBRARIES "${ICU_LIBRARIES}" "d") ADD_DEBUG_VARIANTS(ICU_LIBRARIES "${ICU_LIBRARIES}" "d")
ADD_DEFINITIONS(-DU_STATIC_IMPLEMENTATION) # required for static ICU ADD_DEFINITIONS(-DU_STATIC_IMPLEMENTATION) # required for static ICU
+1 -1
View File
@@ -223,7 +223,7 @@ void ColladaSerializer::ColladaExporter::ColladaScene::write() {
closeVisualScene(); closeVisualScene();
closeLibrary(); closeLibrary();
COLLADASW::Scene scene (mSW, COLLADASW::URI ("#" + scene_id)); COLLADASW::Scene scene (mSW, COLLADASW::URI ("#" + scene_id), COLLADASW::URI ("#" + scene_id));
scene.add(); scene.add();
} }
} }
+1 -1
View File
@@ -27,7 +27,7 @@
#include <iostream> #include <iostream>
#include <boost/cstdint.hpp> #include <boost/cstdint.hpp>
#if defined(_WIN32) && !defined(__CYGWIN__) #if defined(_WIN32) && defined(__CYGWIN__)
#define SET_BINARY_STREAMS #define SET_BINARY_STREAMS
#endif #endif
#ifdef SET_BINARY_STREAMS #ifdef SET_BINARY_STREAMS
+26 -2
View File
@@ -54,10 +54,12 @@ void init_locale() {
locale = _create_locale(LC_NUMERIC, "C"); locale = _create_locale(LC_NUMERIC, "C");
} }
} }
#else //#else
#endif
#ifdef __APPLE__ #ifdef __APPLE__
#include <xlocale.h> #include <xlocale.h>
#endif //#endif
static locale_t locale = (locale_t) 0; static locale_t locale = (locale_t) 0;
void init_locale() { void init_locale() {
if (locale == (locale_t) 0) { if (locale == (locale_t) 0) {
@@ -66,6 +68,28 @@ void init_locale() {
} }
#endif #endif
#ifdef __MINGW64__
#include <locale>
#include <sstream>
typedef void* locale_t;
static locale_t locale = (locale_t) 0;
void init_locale() {}
double strtod_l(const char* start, char** end, locale_t loc) {
double d;
std::stringstream ss;
ss.imbue(std::locale::classic());
ss << start;
ss >> d;
size_t nread = ss.tellg();
*end = const_cast<char*>(start) + nread;
return d;
}
#endif
// //
// Opens the file, gets the filesize and reads a chunk in memory // Opens the file, gets the filesize and reads a chunk in memory
// //