Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Version 2024.12.04] [Win9x/NT4+ Build] Will not start. Error: "The DOSBOX-X.EXE file is linked to missing export KERNEL32.DLL:GetConsoleWindow." #5314

Closed
dg410a opened this issue Dec 12, 2024 · 12 comments · Fixed by #5319

Comments

@dg410a
Copy link

dg410a commented Dec 12, 2024

Not sure if this is a bug or if I'm missing something. So, I'll post this as a blank issue.

I just downloaded the Windows 9x build of DOSBox-X and I could not get it to start on my Windows 98 SE machine. I get the following error:

"The DOSBOX-X.EXE file is linked to missing export KERNEL32.DLL:GetConsoleWindow."

The OS has all updates installed through the Windows 98 SE Unofficial Service Pack 2.1 and I also have Visual C++ 2005 Redistributable installed. I'm not sure what else I need to make this work or if the Win9x build is just broken at the moment. Of course, I could just use KernelEx, but I don't want to go through the trouble of installing it just to get DOSBox-X working on Win 98 SE. For clarification, I am using the latest version of DOSBox-X as I write this.

@Torinde
Copy link
Contributor

Torinde commented Dec 13, 2024

Same for me.
Last version that works 2024.03.01
First version that doesn't work 2024.07.02

I assume something changed in how project is compiled/packaged.

@MrMadguy64
Copy link

GetConsoleWindow requires Windows 2000. Such functions shouldn't be imported statically. Only via GetProcAddress.

@dg410a
Copy link
Author

dg410a commented Dec 13, 2024

Alright. So, based on the comments so far, I went ahead and tried the Win9x build version 2024.03.01, and I was able to start it under Windows 98 SE.

So, something must've definitely changed in how it was compiled with regards to the latest version (2024.12.04 as of this writing). Probably the only option for now is to compile it myself, but I'll probably need instructions as to how to properly create a build that actually works under Windows 9x. Or maybe something in the package is broken to the point where it doesn't work on Win9x period no matter how I would compile it.

@Torinde
Copy link
Contributor

Torinde commented Dec 13, 2024

GetConsoleWindow requires Windows 2000. Such functions shouldn't be imported statically. Only via GetProcAddress.

The only commit I see with that is 0cb36c6 where it's made to be skipped for HX DOS version...

If @crazii or somebody else can trace what broke the 9x support between March and July and goes to restore it, please check if you can also enable NT3.5x support (maybe similar to DOSBox Compilation Guides (by @DosFreak) instructions for building DOSBox SVN). NT3.51 bare metal enthusiasts can then use it.

@Dobby233Liu
Copy link
Contributor

On Discord:
image

@Dobby233Liu
Copy link
Contributor

Personally I suspect it being caused by the tinyfiledialogs update

@MrMadguy64
Copy link

MrMadguy64 commented Dec 14, 2024

Searching in sources shows following references to GetConsoleWindow:
\src\debug\debug.cpp: 4460, 4465
\src\gui\menu_callback.cpp: 2352, 2364
\src\gui\sdlmain.cpp: 6862, 8651, 8652

GetConsoleWindow is usually used to obtain default console window handle, created by console application.

@Dobby233Liu
Copy link
Contributor

Searching in sources shows following references to GetConsoleWindow:

All of these have a !defined(_WIN32_WINDOWS) guard

@MrMadguy64
Copy link

MrMadguy64 commented Dec 14, 2024

Searching in sources shows following references to GetConsoleWindow:

All of these have a !defined(_WIN32_WINDOWS) guard

Yeah, you're right.

tinyfiledialogs.c has following references to GetConsoleWindow, that aren't guarded: 2744, 2860, 2902, 3036, 3104, 3158, 3213

P.S. It's the same code, copy-pasted several times.

@maron2000
Copy link
Contributor

Can you try the nightly build by PR #5319.

@Torinde
Copy link
Contributor

Torinde commented Dec 17, 2024

It works for me, thanks!

@Torinde
Copy link
Contributor

Torinde commented Dec 17, 2024

@maron2000, can you please adapt the DOSBox Compilation Guides instructions and make a build working also on NT3.50?

If possible, supporting running on 386 without FPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants