I'm attempting to compiling my C++ code using a DOS 16-bit compiler. What compiler can I use to compile my source using the OpenDoors 6.2 door toolkit? I have a Win32 and Linux version of my door Legion, I'm needing a DOS 16-bit version. It's been decades since I've used DOS except for DOSEMU and DOSBOX. I was thinking I could possibly compile my code in DOSEMU given I find a compiler with all the include files in it for C++.
I'm attempting to compiling my C++ code using a DOS 16-bit compiler. What compiler can I use to compile my source using the OpenDoors 6.2 door toolkit?
I have a Win32 and Linux version of my door Legion, I'm needing a DOS 16-bit version. It's been decades since I've used DOS except for DOSEMU and DOSBOX.
I was thinking I could possibly compile my code in DOSEMU given I find a compiler with all the include files in it for C++.
Re: OpenDoors Toolkitthat I found was Open Watcom:
By: Jon Justvig to All on Sat Dec 26 2015 19:22:26
A few years ago, I did a search for a modern C++ compiler for DOS, and one
http://www.openwatcom.orgconsidered a bit old now (and wouldn't support the latest C++ standards).. However, considering it's DOS, I suppose a compiler from 2010 isn't too bad. :) I haven't tried OpenDoors with it though, so I don't know how well it will work with OpenDoors.
That page says their current release is from 2010, which can already be
Considering that it's (probably) a different compiler than you've been usingso far, and considering it's 5 years old, I suppose there's a chance that you might have to update parts of your code so it will compile with Open Watcom (and you'd want to make sure it still compiles with your usual compiler too).
I don't know for sure that they will work with OpenDoors 6.2, but you can try the latest 16-bit C compiler from Microsoft (Visual C++ 1.52). I actually have it available for download here on Vertrauen: ftp://vert.synchro.net/main/prog/msvc15.zip
Or Borland C++ v3.1:
ftp://vert.synchro.net/main/prog/bc31.zip
I tried Open Watcom and the docs felt like a novel, just trying to find simple instructions to find the compiler. I still have it, however, I didn't have success in compiling my source. I couldn't figure out how to link the ODoorW.lib. I'll give it another shot.
didn't have success in compiling my source. I couldn't figure out how to link the ODoorW.lib. I'll give it another shot.
Re: OpenDoors Toolkit
By: Jon Justvig to All on Sat Dec 26 2015 07:22 pm
I don't know for sure that they will work with OpenDoors 6.2, but you can try the latest 16-bit C compiler from Microsoft (Visual C++ 1.52). I actually have it available for download here on Vertrauen: ftp://vert.synchro.net/main/prog/msvc15.zip
Re: OpenDoors Toolkit
By: Jon Justvig to All on Sat Dec 26 2015 07:22 pm
I don't know for sure that they will work with OpenDoors 6.2, but you can try the latest 16-bit C compiler from Microsoft (Visual C++ 1.52). I actually have it available for download here on Vertrauen: ftp://vert.synchro.net/main/prog/msvc15.zip
For the Visual C++ 1.52 compiler, I believe I've used this one before to compile before. However, I don't know the command line to compile a cpp source and include the opendoor (ODOORL.LIB?) Could you give me an example?
Yeah, I'm used to Visual Studio and Code::Blocks which I have no problems using with Win32/Linux. One problem was finding the include files for C++ as well. I'll have to do some google searches and see what I can come up with. The thing with the compilers I use currently is that I didn't haveto
change any code. IIRC, I have compiled it for DOS 16-bit before, butit's
been years. Wish I would have kept whatever it was, now I have to go digging. <grin>
Re: OpenDoors Toolkit
By: Jon Justvig to Digital Man on Mon Dec 28 2015 02:03 pm
Usually it'd be something like this:
cl myprogram.c somelib.lib
You might need more options (like "/Iinclude-path", but often not).
Re: OpenDoors Toolkit
By: Jon Justvig to All on Sat Dec 26 2015 07:22 pm
Or Borland C++ v3.1:
ftp://vert.synchro.net/main/prog/bc31.zip
Re: OpenDoors Toolkit
By: Jon Justvig to Digital Man on Mon Dec 28 2015 02:03 pm
Usually it'd be something like this:
cl myprogram.c somelib.lib
You might need more options (like "/Iinclude-path", but often not).
Not sure what to do at this point. I attempted to compile my program.
While compiling Visual C++ 1.52 told me it couldn't find my C++ headers. I looked in the include directory and just found C headers.
So I tried using
headers from Open Watcom, that was a disaster. I'll give Borland C++ a try.
Re: OpenDoors Toolkit
By: Jon Justvig to All on Sat Dec 26 2015 07:22 pm
Or Borland C++ v3.1:
ftp://vert.synchro.net/main/prog/bc31.zip
Only one error so far with Borland C++:
Fatal c:\temp\include\crtdefs.h 40: Error directive: ERROR: Only Win32 target supported!
What could be causing this?
Re: OpenDoors Toolkit
By: Jon Justvig to Digital Man on Mon Dec 28 2015 05:39 pm
temp\include\crtdefs.h is for use with Windows programs. But the compiler you're using (bc++ 3.1) is for DOS programs, so they're not compatibler with eachother. Where did that crtdefs.h come from?
Re: OpenDoors Toolkit
By: Jon Justvig to Digital Man on Mon Dec 28 2015 05:39 pm
temp\include\crtdefs.h is for use with Windows programs. But the compiler you're using (bc++ 3.1) is for DOS programs, so they're not compatibler with eachother. Where did that crtdefs.h come from?
Here's my main, perhaps it was caused by this:
#ifdef ODPLAT_WIN32
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow){
#else
int main(int argc, char *argv[]){
#endif
/* Add local variables here. */
#ifdef ODPLAT_WIN32
od_control.od_cmd_show = nCmdShow;
od_parse_cmd_line(lpszCmdLine);
#else
od_parse_cmd_line(argc, argv);
#endif
But, I'm not sure...
Re: OpenDoors Toolkit
By: Jon Justvig to Digital Man on Mon Dec 28 2015 04:40 pm
Okay, good luck!
I found out Borland C++ doesn't carry all the C++ headers
either, just (*.h). Not sure what I can do.
DJGPP looks like it could be
good. It seems to be newer and giving me a little more feedback in the debugger.
I haven't tried DJGPP myself, but it sounds like it should be able to produce a DOS executable from C++. It looks like it's fairly recent (the zip files are from 2015), so it should hopefully be able to compile fairly modern C++ code. The documents also say it's based on a port of the GNU compiler tools, so if you've compiled your door for Linux (probably using the GNU tools), then hopefully it should be fairly easy to build them for DOS with DJGPP.
It's been a long time, but I've used DJGPP in the past. Never had any problems with it back then in taking care of the standards... It was always nice to be running gcc on a DOS box, too. ;)
C++ header filenames without the .h didn't become part of the standard until (I believe) 1998. Borland C++ 3.1 came out quite a while before that (around 1992, I think), so it has the earlier header files with the .h filename extensions.
Hopefully that will work better for what you need.
:) It sounded like DJGPP can cross-compile, too (so theoretically, perhaps you could run the Win32 or Linux version and have it build a DOS executable). I like that the GNU tools have been ported to so many platforms (including DOS) though.
I haven't tried DJGPP myself, but it sounds like it should be able to produce
a DOS executable from C++. It looks like it's fairly recent (the zip files
I found this page on DJGPP regarding .lib files:
http://www.delorie.com/djgpp/v2faq/faq17_5.html
As far as I understand, I won't be able to use .lib files with it Is there a work around?
I haven't tried DJGPP myself, but it sounds like it should be able to
produce
a DOS executable from C++. It looks like it's fairly recent (the zip
files
It does produce a DOS executable, but not a 16-bit one whih is what was requested.
:) It sounded like DJGPP can cross-compile, too (so theoretically,
perhaps you could run the Win32 or Linux version and have it build a
DOS executable). I like that the GNU tools have been ported to so many
platforms (including DOS) though.
If I could figure out how to add the ODOORL.LIB library file I might be doing all right. I tried renaming it to a static library file libdoor.a, it sat there for awhile but just gave me errors. Of course I tried just ODOORL.LIB. Not too sure yet.
Nightfox wrote to Jon Justvig <=-
Re: DJGPP (was Re: OpenDoors Toolkit)
By: Jon Justvig to Nightfox on Tue Dec 29 2015 19:09:51
If I could figure out how to add the ODOORL.LIB library file I might be doing all right. I tried renaming it to a static library file libdoor.a, it sat there for awhile but just gave me errors. Of course I tried just ODOORL.LIB. Not too sure yet.
Deuce pointed out that DJGPP won't produce a 16-bit executable, so it sounds like DJGPP isn't the best solution anyway.. :/ I hope you can
get it built with something else.
Nightfox wrote to Jon Justvig <=-
Re: DJGPP (was Re: OpenDoors Toolkit)
By: Jon Justvig to Nightfox on Tue Dec 29 2015 19:09:51
If I could figure out how to add the ODOORL.LIB library file I might be doing all right. I tried renaming it to a static library file libdoor.a, it sat there for awhile but just gave me errors. Of course I tried just ODOORL.LIB. Not too sure yet.
Deuce pointed out that DJGPP won't produce a 16-bit executable, so it sounds like DJGPP isn't the best solution anyway.. :/ I hope you can get it built with something else.
One less option I have here in regards to which C++ compiler I can use to produce a 16-bit executable. So, I'm not what I can do at this point. If it's possible, I want to figure it out or have it explained to me.
Re: DJGPP (was Re: OpenDoors
By: Jon Justvig to Nightfox on Tue Dec 29 2015 08:32 pm
It sounds like you need to either:
A. Raise your requirements of the target platform (e.g. support on 32-bit DOS or Windows), or:
B. Lower the requirements of the source code (use only C++ source and libraries circa 1990's).
@MSGID: <567F9D4F.4.dove-program@vintagebbsing.com>
@REPLY: <567F614D.2255.dove_dove-prg@digitaldistortionbbs.com>
Re: OpenDoors Toolkit
By: Nightfox to Jon Justvig on Sat Dec 26 2015 07:55 pm
Re: OpenDoors Toolkit
By: Jon Justvig to All on Sat Dec 26 2015 19:22:26
A few years ago, I did a search for a modern C++ compiler for DOS, and one
that I found was Open Watcom:
http://www.openwatcom.org
That page says their current release is from 2010, which can already be
considered a bit old now (and wouldn't support the latest C++
standards).. However, considering it's DOS, I suppose a compiler from
2010 isn't too bad. :) I haven't tried OpenDoors with it though, so I don't know how well it will work with OpenDoors.
I tried Open Watcom and the docs felt like a novel, just trying to find simple instructions to find the compiler. I still have it, however, I didn't have success in compiling my source. I couldn't figure out how
to link the ODoorW.lib. I'll give it another shot.
Sysop: | Eric Oulashin |
---|---|
Location: | Beaverton, Oregon, USA |
Users: | 94 |
Nodes: | 16 (0 / 16) |
Uptime: | 09:36:17 |
Calls: | 5,138 |
Calls today: | 5 |
Files: | 8,491 |
D/L today: |
1 files (279K bytes) |
Messages: | 352,555 |