Baron-von-Riedesel / HX

Home of the HX DOS Extender and its included DPMI-host HDPMI.
197 stars 14 forks source link

Visual Studio 2019 compatibility #9

Closed joakim-strandberg closed 3 years ago

joakim-strandberg commented 4 years ago

If one uses Visual Studio 2019 to turn a C programming language "Hello world!" application into machine code and attempts to execute it using the HX DOS Extender one gets: C:\main.exe DPMILD32: import not found: initializeSListHead DPMILD32: import not found: GetModuleHandleExW DPMILD32: import not found: FindFirstFileExW DPMILD32: file KERNEL32.dll DPMILD32: C:\HX\BIN\dkrnl32.dll: cannot resolve imports

This seems to be due to the C-runtime that uses functions that are not supported by the HX DOS Extender. It would be nice if the HX DOS Extender would support simple terminal based applications compiled by recent versions of Visual Studio. Or is there any known workaround?

Baron-von-Riedesel commented 4 years ago

Or is there any known workaround?

No, those functions aren't emulated yet. IIRC, the last version that worked was Visual Studio 2008.

Baron-von-Riedesel commented 3 years ago

Some functions - including the ones mentioned above - added to kernel32 emulation. I haven't tested VS 2019 myself yet.

joakim-strandberg commented 3 years ago

Wow, thanks for your work and letting me know! I will see if I can try it out.

joakim-strandberg commented 3 years ago

I have now tried to build the HX DOS Extender source code using JWasm and JWlink (from your repositories) and nmake from Visual Studio 2019 but gotten stuck on the HX Development package not being present on my VM with 64-bit Windows 10 Home Edition. I did find a 32-bit version of HXDEV at the bottom of the web page: https://www.japheth.de/HX.html However, I didn't find any documentation on how to build the source code of the HXDEV package to produce the binaries EditPe and others... It seems it is possible to build HX DOS Extender on all the operating systems Linux, Mac OS X and windows but I haven't seen any recommendation on which operating system to use. I am thinking that it should be easier to build HX DOS Extender for DOS on a win32 system but not sure. Is there any recommended documentation on the internet on how to build HX DOS Extender from source code? Grateful for any hints.

Baron-von-Riedesel commented 3 years ago

I did find a 32-bit version of HXDEV at the bottom of the web page: https://www.japheth.de/HX.html

That's not the correct location. This site is NOT maintained by me, it's just an (illegal) copy of my site from 2013. You find the current HX packages here on github:

https://github.com/Baron-von-Riedesel/HX/releases

Just click on the "assets" link. Be sure to use the latest prerelease (currently v2.19 pre5)

Is there any recommended documentation on the internet on how to build HX DOS Extender from source code?

read the hxsrc.txt file.

andrewbird commented 3 years ago

That's not the correct location. This site is NOT maintained by me, it's just an (illegal) copy of my site from 2013.

How irritating that must be for you! Did you just forget to renew the domain, or was it stolen from you in some other way?

Baron-von-Riedesel commented 3 years ago

Did you just forget to renew the domain, or was it stolen from you in some other way?

Well, I had lost interest in this site, but still paid each year some euros so the address won't be hijacked. But then my provider ("VCServer") released japheth.de - without notifying me. I was notifyed by DENIC, 2 month later, and still have no clue why this all happened.

joakim-strandberg commented 3 years ago

I hereby confirm it is possible to run hello world written in the C programming language and compiled with Visual Studio 2019 with the prerelease v2.19 pre5. Many thanks!

The prerelease v2.19 pre 5 is actually even more far reaching. It enables using the latest version of the 32-bit Janus/Ada compiler 3.2.1 targeting Windows (http://www.rrsoftware.com/) to create multi-task (multi-threaded) command line applications implemented in Ada to run on Freedos (which is noteworthy since DOS is a single-threaded operating system). Many thanks again!

andrewbird commented 3 years ago

@Baron-von-Riedesel I can't see the motivation for anyone recreating a site verbatim from 2013, except if they were monetising it by placing ads etc, but that clearly isn't the case. Are you sure that cloudflare.com do have an active site owner, it might be worth explaining to them that it's your content and they should take it down?