Closed firewave closed 1 year ago
There's also a linker errors ...
2>ymfm.lib(ymfm_opn.obj) : error LNK2038: mismatch detected for 'annotate_string': value '1' doesn't match value '0' in mame.obj
2>ymfm.lib(ymfm_opn.obj) : error LNK2038: mismatch detected for 'annotate_vector': value '1' doesn't match value '0' in mame.obj
2>ymfm.lib(ymfm_adpcm.obj) : error LNK2038: mismatch detected for 'annotate_string': value '1' doesn't match value '0' in mame.obj
2>ymfm.lib(ymfm_adpcm.obj) : error LNK2038: mismatch detected for 'annotate_vector': value '1' doesn't match value '0' in mame.obj
2>ymfm.lib(ymfm_ssg.obj) : error LNK2038: mismatch detected for 'annotate_string': value '1' doesn't match value '0' in mame.obj
2>ymfm.lib(ymfm_ssg.obj) : error LNK2038: mismatch detected for 'annotate_vector': value '1' doesn't match value '0' in mame.obj
Edit: These are caused by me not enabling ASAN completely (actually multi-selected projects not applying settings) - see: https://learn.microsoft.com/en-us/cpp/sanitizers/error-container-overflow
We don’t actually support building with VS2022 – there are too many compiler regressions. Note that only VS2019 is mentioned here: https://docs.mamedev.org/initialsetup/compilingmame.html#building-with-microsoft-visual-studio
bool
-to-int
promotion.cpu_device *
, providing a common type for the conditional expression. I can work around it, but please take up the issue with Microsoft – it’s going to cause a lot of pain for a lot of people.gbxregion
is non-null but offset
is unset, so offset
will always be set when reaching line 1230. Initialising variables to stop MSVC reporting this warning hides real bugs where a path is created that allows a variable to be used with no meaningful value set that could otherwise be detected with Coverity and Valgrind. You need to set NOWERROR=1
to build with MSVC due to these spurious warnings.F
suffix? We aren’t adding F
suffixes to all the numbers in that massive table – that would be far too much unnecessary clutter, making already overly long lines even longer and harder to read.Three of the things are addressed in ae24a68f0d7f610fdb975fd3626f622fd0bdd642. The others are issues with MSVC itself. As usual, the response is that we don’t pander to broken toolchains.
The integer overloads of std::signbit
might not be part of the C++ standard, despite what cppreference.com
claims. See https://bugs.launchpad.net/kicad/+bug/1742803.
Thanks a lot for the analysis and the fixes.
I added an additional error after my initial post which you have missed though. It's the last one about the missing I8049
. That's one I don't understand at all. It's like an include is missing...
Some of the warnings might also pop up with Clang (they look quite familiar) but are warnings which are disabled by default.
- Fourth error is legitimate, but you really need to provide more context. I needed to work out the full source file path and to go through all uses of crystal frequencies in the file to work out where it come from.
That's all the info Visual Studio gives - which also is a bug IMO. I took a look and it seemed like some device was giving a 0
clock but apparently it was something different.
- The solution to the tenth error is described in detail on [MSVC] fatal error C1189: #error: "This version of XAudio2 is available only in Windows 8 or later. Use the XAudio2 headers and libraries from the DirectX SDK with applications that target Windows 7 and earlier versions." #9968, and also mentioned here. I don’t know why you’re reporting it as a bug when it’s a configuration issue on your side.
I didn't run into these the last time I compiled it but that's been a while now. Also it included some errors which cannot be "configured away" so I thought the build had regressed in recent versions and just provided all of them - even if known.
I didn't think to look for a "known issue" section since there's no reference in the build guide. Me not thinking that was the paragraph after the VS build is about shortcomings of MSYS2 but there is none about VS. That comes later on in the "Known issues" section. I think there should maybe a reference to the section from the build sections and this additional MSYS2 paragraph should be moved there and moved closer to the previous one. That might make it a bit clearer.
There's a linker error after all:
358>portaudio.lib(pa_win_wdmks.obj) : error LNK2005: KSDATAFORMAT_SUBTYPE_MIDI already defined in dxguid.lib(dxguid.obj)
But that is already implicitly covered in https://github.com/mamedev/mame/issues/9968#issuecomment-1172054361 and the documentation.
The integer overloads of
std::signbit
might not be part of the C++ standard, despite whatcppreference.com
claims. See https://bugs.launchpad.net/kicad/+bug/1742803.
I added an additional error after my initial post which you have missed though. It's the last one about the missing
I8049
. That's one I don't understand at all. It's like an include is missing...
Nevermind - that's #10482.
For posterity, I've reported the first issue mentioned above here.
I ran
make vs2019
, opened it with Visual Studio 2022, performed the conversion and did aRelease|x64
build. I am using themame0249
tag and Windows 10.See #5741 and #4771.
dvk_kcgd.cpp
There's a lot of these - those are just stupid as they cannot even be fixed by adding a return...
xaudio2_sound.cpp
See #9968.