BrogueCE
BrogueCE copied to clipboard
Windows dev: mt embedding manifest destroys gdb debugging info
i was going to make some changes this weekend but ran into problems building and debugging on windows. it had been a while since touching the code so there were changes to the makefile and a major release for my ide. i wasn't sure what was causing the issue and i won't disclose how long it took me to figure it out, but i think the issue is the windows manifest file.
the executable that creates the manifest, mt.exe wasn't on my machine so the build would fail. when i did finally install it (apparently it's part of the windows sdk), the build would succeed but debugging would fail. gdb complained about to recognizing the file format. i believe this is because the manifest gets embedded in the brogue binary and mucks with the debug info. after commenting out the call to mt in brogue.mk, i was able to debug.
- zenzombie, https://discord.com/channels/622393898064543759/624198844045066250/1105223783687671809
Apparently we might not need to embed the manifest in the exe at all:
If possible, you should embed the application manifest as a resource in your application's .exe file or .dll. If you can't do that, then you can place the application manifest file in the same directory as the .exe or .dll.
https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests