dcaputi
Posts: 3
Joined: Sun Aug 25, 2024 2:46 am

oldschool dev, n00b on mame, build fail on windows

I want to debug mame on a PC to get familiar with how the USB controller mapping for unique IDs works.

Keep in mind I have decades of experience as a C/C++ windows desktop developer - just a n00b with mame and open source projects in general.
(although I recently contributed to the RespeQt project, refactoring the UI to improve usability)

TL;DR - here's where it first dies when attempting to build from the VS2019 IDE:
(note that the complete solution build fails after several minutes - this is a snip of a rebuild for that failing project)

Build started...
1>------ Build started: Project: osd_windows, Configuration: Debug Win32 ------
1>debugimgui.cpp
1>F:\MameSource\mame-master\src\osd\modules\debugger\debugimgui.cpp(8,10): fatal error C1083: Cannot open include file: 'imgui/imgui.h': No such file or directory
1>F:\MameSource\mame-master\src\osd\modules\debugger\debugimgui.cpp(8,10): fatal error C1083: #include "imgui/imgui.h"
1>F:\MameSource\mame-master\src\osd\modules\debugger\debugimgui.cpp(8,10): fatal error C1083: ^

Not sure how this dependency is simply missing from the latest master off GitHub.

Anyone have any idea where imgui may be hiding? or perhaps I'm overlooking something more obvious...
mhoes
Posts: 239
Joined: Wed Oct 26, 2016 12:26 pm

Re: oldschool dev, n00b on mame, build fail on windows

dcaputi wrote: Tue Sep 10, 2024 3:40 am I want to debug mame on a PC to get familiar with how the USB controller mapping for unique IDs works.

Keep in mind I have decades of experience as a C/C++ windows desktop developer - just a n00b with mame and open source projects in general.
(although I recently contributed to the RespeQt project, refactoring the UI to improve usability)

TL;DR - here's where it first dies when attempting to build from the VS2019 IDE:
(note that the complete solution build fails after several minutes - this is a snip of a rebuild for that failing project)

Build started...
1>------ Build started: Project: osd_windows, Configuration: Debug Win32 ------
1>debugimgui.cpp
1>F:\MameSource\mame-master\src\osd\modules\debugger\debugimgui.cpp(8,10): fatal error C1083: Cannot open include file: 'imgui/imgui.h': No such file or directory
1>F:\MameSource\mame-master\src\osd\modules\debugger\debugimgui.cpp(8,10): fatal error C1083: #include "imgui/imgui.h"
1>F:\MameSource\mame-master\src\osd\modules\debugger\debugimgui.cpp(8,10): fatal error C1083: ^

Not sure how this dependency is simply missing from the latest master off GitHub.

Anyone have any idea where imgui may be hiding? or perhaps I'm overlooking something more obvious...
I assume you have already read and followed the relevant instructions about how to compile MAME on Windows in the docs section of the MAME website, but here they are anyway in case you missed them :

https://docs.mamedev.org/initialsetup/c ... gmame.html
dcaputi
Posts: 3
Joined: Sun Aug 25, 2024 2:46 am

Re: oldschool dev, n00b on mame, build fail on windows

Thanks for that @mhoes. Yes, I was able to decipher the relevant sections of that in order to get to the point where I have the failed build in VS2019. I suppose I can try the mingw command line build, but I can't imagine the missing dependency will magically appear. Nevertheless, I'll report back on that shortly.
mhoes
Posts: 239
Joined: Wed Oct 26, 2016 12:26 pm

Re: oldschool dev, n00b on mame, build fail on windows

dcaputi wrote: Thu Sep 12, 2024 1:27 am Thanks for that @mhoes. Yes, I was able to decipher the relevant sections of that in order to get to the point where I have the failed build in VS2019. I suppose I can try the mingw command line build, but I can't imagine the missing dependency will magically appear. Nevertheless, I'll report back on that shortly.
Well, I'm afraid I cannot be of more help here then (my experience with compiling from source is limited to Linux). Perhaps someone else will come along.
dcaputi
Posts: 3
Joined: Sun Aug 25, 2024 2:46 am

Re: oldschool dev, n00b on mame, build fail on windows

Visual Studio is my comfort zone, but I'm flexible.
... switching to plan B - mingw command shell build...

any clue what I'm missing here:

Code: Select all

$ make
GCC 14.1.0 detected
Precompiling src/emu/emu.h...
make[2]: *** [precompile.make:317: ../../../../mingw-gcc/obj/x64/Release/emu.h.gch] Error 1
make[1]: *** [Makefile:100: precompile] Error 2
make: *** [makefile:1126: windows_x64] Error 2
quick google search came up with more questions than answers ... definitely not my comfort zone
mhoes
Posts: 239
Joined: Wed Oct 26, 2016 12:26 pm

Re: oldschool dev, n00b on mame, build fail on windows

dcaputi wrote: Tue Sep 24, 2024 3:24 am Visual Studio is my comfort zone, but I'm flexible.
... switching to plan B - mingw command shell build...

any clue what I'm missing here:

Code: Select all

$ make
GCC 14.1.0 detected
Precompiling src/emu/emu.h...
make[2]: *** [precompile.make:317: ../../../../mingw-gcc/obj/x64/Release/emu.h.gch] Error 1
make[1]: *** [Makefile:100: precompile] Error 2
make: *** [makefile:1126: windows_x64] Error 2
quick google search came up with more questions than answers ... definitely not my comfort zone
Did you get the build tools ('msys64-2022-01-12.exe') from here ? (without updating, but following the rest of the instructions on that page) : https://www.mamedev.org/tools/
mhoes
Posts: 239
Joined: Wed Oct 26, 2016 12:26 pm

Re: oldschool dev, n00b on mame, build fail on windows

Also, I was about to go on about this, but this thread [1] and forum in general may be of more help when wanting to create a debug build of MAME using Visual Studio. At the very least, it sees more traffic than this forum, and more devs hang out there who will be better at assisting you to reach that goal successfully than me.

[1]
https://forums.bannister.org/ubbthreads ... 5&page=all

https://forums.bannister.org/ubbthreads ... Post123680

Return to “MAME Discussion”