-
Notifications
You must be signed in to change notification settings - Fork 118
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
C++ with OpenWatcom #2235
Comments
First, I believe this could easily turn into a very long road, trying to get C++ programs running for ELKS. If this is for MicroWeb, I suggest taking a hard look at the existing source to make sure that even after the arduous process of getting any C++ programs running, its DOS architecture is analyzed so that the program can be converted without a major rewrite. That said, the way you'll need to move forward on any efforts is to read the error messages, starting with just the first error. My plate is very full and I won't have time to solve all the C++ related problems likely to come up (but am glad to help when I can). The first error is "unable to open 'cstdarg'". That means you need to go find cstdarg somewhere in the OWC source (there may be multiple directories, and the header may pull in other headers), and make sure the compiler has additional include directories specified. This can get tricky since OWC supports 16- and 32- bit compilations and a number of different targets. After you get through that, you'll likely start requiring many more compiler-generated call to internal routines written in ASM, or possibly C++. These routines will need to be pulled out into another directory and compiled/assembled. Read the error messages, that'll tell you what needs to be done. C++ requires run-time memory allocation and constructor/destructors, and a huge standard library. All of this needs to be looked at. I have no idea how much or little MicroWeb uses, hopefully very little and is only using the C++ language for its very good features, without pulling in tons of class libraries or using specialized C++ features like RTTI (run time type information) or exceptions. On the ELKS OpenWatcom C compiler/library port, after a long porting process and coming to understand how OWC worked, all the required files were moved to libc/watcom, libc/include/watcom, libc/watcom/asm and libc/watcom/syscall, but ultimately only because of the confusion that started occurring with the mess of C header files written specially for ia16-elf-gcc vs OWC vs C86. You'll probably want to keep all these changes on a fork on your system, as ELKS headers don't support any kind of C++ special requirements, such as |
Thanks for the message @ghaerr. This is not top-priority for me, I just wanted to give a shot. And indeed, it is for MicroWeb. I'll take a look carefully in Watcom includes and the error messages I'm seeing, and see how far I can get without spending lots of time on this. |
This issue is related to: jhhoward/MicroWeb#40 |
I'm trying to build a c++, and indeed I can build and link a very simple C++ code, but any header I try to add, I get errors like:
The text was updated successfully, but these errors were encountered: