building and working on Windows 7 compiled with Visual Studio Express 2012.
A couple of things needed changing :
* MSVC 2012 has no trunc or round, i have added those to mathc99 and included mathc99 to the files needed.
The implementations were taken from boost.
* MSVC 2012 stl does now allow accessing out of bounds elements in std:vector as an array, so "chain->objects[i]" will
fail in "OpenCSGRenderer::renderCSGChain". Whatever the platform, it will me a good idea to change this
code to something that does not trigger undefined behavior.
* MSVC 2012 cannot figure out the types involved in "if (file_size == 80 + 4 + 50*facenum) {", i have added
a cast to force it to "if (file_size == static_cast<std::streamoff>(80 + 4 + 50*facenum)) {".
The next round would be regression testing and debugging and possibly more changes to the OpenSCAD main code.
The round after that would be changing the .pro and .pri files to create correct visual studio solutions.
25 lines
837 B
Text
25 lines
837 B
Text
# win32-specific MSVC compiler general settings
|
|
|
|
win32*msvc* {
|
|
#configure additional directories
|
|
INCLUDEPATH += $$(MPIRDIR)
|
|
INCLUDEPATH += $$(MPFRDIR)
|
|
|
|
# don't know where the __WIN32__ is usually set
|
|
DEFINES += _USE_MATH_DEFINES NOMINMAX _CRT_SECURE_NO_WARNINGS YY_NO_UNISTD_H __WIN32__
|
|
|
|
# disable MSVC warnings that are of very low importance
|
|
# disable warning about too long decorated names
|
|
QMAKE_CXXFLAGS += -wd4503
|
|
# CGAL casting int to bool
|
|
QMAKE_CXXFLAGS += -wd4800
|
|
# CGAL's unreferenced formal parameters
|
|
QMAKE_CXXFLAGS += -wd4100
|
|
# lexer uses strdup() & other POSIX stuff
|
|
QMAKE_CXXFLAGS += -D_CRT_NONSTDC_NO_DEPRECATE
|
|
# Treat WChar_t as a builtin type, allows Qt to call boost funcions
|
|
QMAKE_CXXFLAGS += /Zc:wchar_t
|
|
# increases the number of sections in .obj file
|
|
QMAKE_CXXFLAGS += /bigobj
|
|
|
|
}
|