jmeubank / tdm-gcc

TDM-GCC is a cleverly disguised GCC compiler for Windows!
https://jmeubank.github.io/tdm-gcc/
572 stars 49 forks source link

gdb cannot run in Windows7 #52

Closed MagicGeeker closed 6 months ago

MagicGeeker commented 2 years ago

I test tdm64-gcc-10.3.0-2.exe on Windows 7,gcc.exe is OK but gdb.exe cannot run because of missing api-ms-win-core-path-l1-1-0.dll.

MagicGeeker commented 2 years ago

here is the screenshot 1

revelator commented 1 year ago

win7 does not have the ucrt runtimes installed by default, try installing these -> https://support.microsoft.com/en-us/topic/update-for-universal-c-runtime-in-windows-c0514201-7fe6-95a3-b0a5-287930f3560c

MagicGeeker commented 1 year ago

win7 does not have the ucrt runtimes installed by default, try installing these -> https://support.microsoft.com/en-us/topic/update-for-universal-c-runtime-in-windows-c0514201-7fe6-95a3-b0a5-287930f3560c

I tried but it seems does not work.And I can not find api-ms-win-core-path-l1-1-0.dll in Windows 10 also (search using Everything) but gdb works in Windows 10.

revelator commented 1 year ago

gdb might have been build with win10 as default target in that case it will most likely not work on win7, the msys2 project has ditched support for any windows versions below 10 so if you got it from there that might explain it. there is a fix for the missing dll here https://answers.microsoft.com/en-us/windows/forum/windows_7-update/windows-10-upgrader-appexe-system-error/29ef57a1-079c-424d-bbd7-78ffcc654b69

revelator commented 1 year ago

instead of copying in the renamed dll to that folder just copy it back after you have renamed the copy to the missing dll file.

PNBRQK commented 1 year ago

the reason for such failure might be that this build of gdb loads python scripts by default, and python 3.9+ in turn requires new Windows API function(s) like PathCchCanonicalizeEx from api-ms-win-core-path-l1-1-0.dll that aren't present on Win7.

Anyhow, go for https://github.com/nalexandru/api-ms-win-core-path-HACK and see whether his/her hack solves the problem.