Closed Katharsas closed 1 year ago
Hi there! Thanks for the detailed report :) From what I can gather right now, it looks like you're right about the compiler flags at least. Those should be an easy fix and I'll look into them later.
As for all the other compilation errors, I'll have to set up a Windows VM to test MSVC so that might take a bit I've set up a VM to test. As far as I know, MSVC does support all features of C++20 so these errors must be something else.
Problems:
archive.cc
are from the base()
function not being available for iterators on MSVC since they are non-standard. Replacing .begin().base()
with .data()
should fix ittest_buffer.cc
are from <array>
not being includedmaterial.hh
, the default initialization of material::alpha_func
is 0
but it should be alpha_function::none
I'll fix these once I get home :)
I've fixed the issues I can see right now in the platforms/support-msvc branch and phoenix now builds with Visual Studio 2019 :slightly_smiling_face: @Katharsas can you clone that branch and check that everything works as intended?
========== Build: 13 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Thanks, it works for me! This is great (I have not tested actually running anything, but might try that soonish). This can be closed i would say.
One small annoyance, not important though for now:
Header files are not shown nicely by Visual Studio, they are lying around with system headers in external section:
It seems to be this problem:
https://stackoverflow.com/questions/32584319/display-include-directory-as-separate-part-of-project-in-visual-studio-using-cma
If I have the need to make some changes, i might look into improving that, but maybe it will not be necessary.
That's cool! I'm happy it wasn't anything too big :D As for the weird placement of header files, that doesn't seem to be a difficult thing to solve too. I'll implement a basic workaround since it seems to be just a few lines of CMake. I would expect config.hh
to appear there, however, since it is generated from config.hh.in
.
@Katharsas MSVC/Visual Studio support is now merged into main
:tada: All project and header files of the phoenix
target should now show up correctly in the project view. If you intend to use the phoenix library itself for a project, just be aware that it is changing rapidly at the moment and you will have to make changes to your code when you update. I'm hoping to have a stable API by the end of September or in early to mid October.
Hi,
i tried building this with CMake 3.24.1 Visual Studio 2019 project generator. Cmake Output:
No idea whats up with the CMake errors at the end there, i ignored them. Then to fix project setup i needed to change:
Properties (all configurations) ->
C++/Command Line/Additional Options
:-Wno-unused-parameter
-Wextra
,-Werror
,-Wconversion
-Wno-conversion
-Wno-conversion
I think these flags do only apply to certain compilers and should not be set if MSVC is used. After that i can build much more than before, however I still get a lot of compile errors (Debug x64):
Looks similar when building in release mode. The projects are configured with
ISO C++20 Standard (/std:c++20)
.I might try again with a later version of Visual Studio, but for Visual Studio 19 it seems to much work to get it running. Maybe not all used C++ 20 features are supported by MSVC, i don't know.