I was attempting to build and run the MAME source on Windows with the only version of Visual Studio I have on this machine, which is VS 2017 Community Edition. I generated the VS solution, opened it and retargeted it to my version of the windows SDK.
Compiling it, I'm encountering this compilation error for the COMP macro for every driver:
Code: Select all
..\..\..\..\..\src\mame\drivers\rmhaihai.cpp(735): error C2975: 'driver_device_creator': invalid template argument for 'FullName', expected compile-time constant expression
18> c:\development\mame\src\emu\device.h(284): note: see declaration of 'driver_device_creator'
The error occurs for template argument 'FullName', 'ShortName', and 'Source'.
There's something about GAME_DRIVER_TRAITS in gamedrv.h that driver_device_creator doesn't like as its template parameters. Maybe there's something with the code that the 2017 compiler doesn't like that was acceptable with previous versions.
Code: Select all
// static game traits
#define GAME_DRIVER_TRAITS(NAME, FULLNAME) \
namespace { \
struct GAME_TRAITS_NAME(NAME) { static constexpr char const shortname[] = #NAME, fullname[] = FULLNAME, source[] = __FILE__; }; \
constexpr char const GAME_TRAITS_NAME(NAME)::shortname[], GAME_TRAITS_NAME(NAME)::fullname[], GAME_TRAITS_NAME(NAME)::source[]; \
}
#define GAME_DRIVER_TYPE(NAME, CLASS, FLAGS) \
driver_device_creator< \
CLASS, \
(GAME_TRAITS_NAME(NAME)::shortname), \
(GAME_TRAITS_NAME(NAME)::fullname), \
(GAME_TRAITS_NAME(NAME)::source), \
game_driver::unemulated_features(FLAGS), \
game_driver::imperfect_features(FLAGS)>
I can build it though the command line no problem.
Anybody encountered this? Searching the forum didn't reveal anything similar to this problem.
Thanks!
coin0p