Closed lab313ru closed 8 years ago
'and' 'not' 'or' are standard keywords that are not supported by MSVC in default mode. instead of replacing them, you could use the compatibility header Microsoft added to 'fix' the problem.
#ifdef _MSC_VER
#include <iso646.h>
#endif
Anyway mixing 'not' and '!', 'and' and '&&' is not a good practice. So, instead of adding such headers, which may not be available in some vs versions, let it be more correct.
Ok, the issue with 'and', 'or' 'not' keywords should be patched up now. And those keywords should be used consistently throughout the codebase.
There are things, that still does not compatible with Visual Studio. Could you merge some more fixes from my request?
I think we could consider removing LLVM as a dependency for now, it makes compiling things troublesome on windows, and no interesting LLVM features are used in the codebase anyway :)
Good idea. And then, we'll try to fix rest of errors.
The latest commit (58532f4) should make dcc llvm-free
Allmost good! But, problem with std::min/max still exists. And Boost (by dcc_original project) requires linking with (there is no path to this library in cmake). libboost_regex-vc140-mt-sgd-1_60.lib
The last commit should have fixed the std::min/max problem. As for boost, we don't use boost_regex in the project ?
I thought no. But VS requires it. I don't know why. I even not found any requirement for this file anywhere.
hmm... we use header-only boost libraries, I have no idea why your compilation would try to use regex ? Maybe some kind of boost configuration issue ?
Maybe. I think I have to rebuild it.
Nope, I've managed to replicate this... investigating
Found the problem, fix soon
Ok, fixes are commited. The dcc builds on msvc2015
And, last things:
Well setting /W4 in the CMakeLists.txt is done to encourage fixing those warnings ;)
And static linkage.. that's another issue - why would we do that ?
Will close this PR, since the msvc2015 build 'works' now ?
Yep, it works now.
Ups, sorry.
for(uint32_t v : prog.relocTable) { // <- iterator is not dereferensable in DccFrontend.cpp
I had not only compiling fixes, but launching fixes too.
That range-based for loop should be working. I have no idea yet why msvc barfs on this code.
But it happens. Could you rewrite it as classic iterator loop?
Found the actual bug, fix is in the latest commit
Ok. Looks like old bugs are fixed now.
Should fix all compilation errors in Visual Studio.