Porting DOS program to Linux. I have the C source code ...
I got put in charge of this DOS program. I have the source code written in C, but when I use gcc, I get these errors about the header files missing:
Code:
gom3.c:8:17: error: dos.h: No such file or directory |
Do you need to port the program, or would it be acceptable to use dosbox or FreeDos to run the program in a virtual machine?
I'm not a programmer, so I'm just sort of thinking outside the box. |
Quote:
http://www.gnu.org/software/libc/man...tml#toc_Memory For example, here is the description of the malloc call which is found in header stdlib.h http://www.gnu.org/software/libc/man...sic-Allocation ------------------ Steve Stites |
Quote:
Quote:
Thanks, I will check out those headers and see if it can work. I'm not really that familiar with C programming so I will have more questions. |
Alright, this seems too messy for me. I need specific header files, and without them, certain functions in the code don't work because they depend on those headers. It would require a lot of rewriting of the code and cleaning up to make it work with gcc. Looks like it's time to pay a professional programmer to do this!
|
The header files conio.h & dos.h contain declarations of functions which are very DOS-specific. You will need to figure out how to achieve the functionality that these provide using only Linux style functions or systems calls. DOS C compilers played fast and loose with real-mode capabilities, which do not exist in a protected-mode OS.
--- rod. |
Quote:
-------------------- Steve Stites |
isolate the non ANSI functions into seperate libs/files.
if they are simple try and find implementations of similar functions or redo them yourself. |
Is it a small program?
Can you (and are you willing) to publish the code under an open source license? What does it do? Depending on the answers to these questions, you might find random coders out there willing to help for no money. |
All times are GMT -5. The time now is 08:50 AM. |