mhavoc
Posts: 10
Joined: Wed Apr 04, 2018 3:09 pm

Issue compiling on VS2017

Hi Folks...

My mame source is compiling fine using MINGW64, but Mame64.exe is crashing when I try to run my new driver. So, I figured I would build in VS2017 in order to have better debugging tools...

I ran...

[MINGW64] make vs2017 SUBTARGET=mhavoc SOURCES=src\mame\drivers\mhavoc.cpp PYTHON_EXECUTABLE=c:/msys64/mingw64/bin/python.exe

and Python sucessfully generated my 88 projects and the .sln file.

Opening the solution in VS2017 is fine but Im getting some strange compilation errors that I have not seen before. Any ideas?

1>main.cpp
1>c:\svn\git\xxx.mame\src\emu\devdelegate.h(90): fatal error C1001: An internal error has occurred in the compiler.
1>(compiler file 'msc1.cpp', line 1518)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1>Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
1>c:\svn\git\xxx.mame\src\emu\devdelegate.h(114): note: see reference to class template instantiation 'device_delegate<Signature>' being compiled

I'm running VS2017 15.8.2 which should be pretty close to current release. This is on Windows 10 64-bit. I get the same errors no matter if I compile in Win32 or x64.

thank you!
mhavoc
Posts: 10
Joined: Wed Apr 04, 2018 3:09 pm

Re: Issue compiling on VS2017

Okay, so apparently I was not running a very recent update of VS 2017... I just updated to VS 2017 15.9.3..

However, still won't compile... *although* the errors are a tad different here, so maybe I need to tweak some solution or project settings?

1>c:\svn\git\xxx.mame\src\emu\devdelegate.h(103): error C2976: 'named_delegate<Signature>': too few template arguments
1>c:\svn\git\xxx.mame\src\emu\devdelegate.h(114): note: see reference to class template instantiation 'device_delegate<Signature>' being compiled
1>c:\svn\git\xxx.mame\src\emu\devdelegate.h(104): error C2976: 'named_delegate<Signature>': too few template arguments
1>c:\svn\git\xxx.mame\src\emu\devdelegate.h(107): error C2976: 'named_delegate<Signature>': too few template arguments

Still compiles on MINGW tho... just not here... still looking for solutions...
mhavoc
Posts: 10
Joined: Wed Apr 04, 2018 3:09 pm

Re: Issue compiling on VS2017

So, I just found this mentioning that the newer versions have this issue while the older version of VS2017 do not.

https://developercommunity.visualstudio ... vdele.html

I will look into downgrading my VS2017, but I was wondering if anyone on the MAME team could confirm what versions of VS 2017 are solid for compiling MAME?

NOTE: Microsoft mentions that this will be fixed in VS2017 v16 (unknow release date?)
mhavoc
Posts: 10
Joined: Wed Apr 04, 2018 3:09 pm

Re: Issue compiling on VS2017

..and one final post here.... I was able to uninstall my VS 2018 15.8+ (no reboot required!)... and then install the 15.7.6 version from this page.

https://docs.microsoft.com/en-us/visual ... -of-vs2017

The process took 3+ hours, but I am now able to compile MAME off the master branch in VS2017 sucessfully and debug.

Hopefully this info helps someone else.

Return to “MAME Discussion”