Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need C compiler for Windows 7 64-bit, to compile to DOS target

I'm trying to find a solution to allow me to compile C code to a DOS executable from Windows 7 64-bit. I recently updated from XP 32-bit to Win7 64-bit, and now my Borland C++ 5.0 compiler won't work. I get an error when it tries to call tlink.exe 16-bit. I'm trying to avoid bringing over another computer with XP but that will have to be my course of action if I can't figure something else out soon.

My target is an embedded x86 running FreeDOS. As much as I'd like to transition to Linux I can't afford the time that would transition would take. Aside from the learning curve of never having used Linux, much of my code is DOS-dependent and would have to be re-written.

I'm hoping there's a windows setting I can just change but my research so far leads me to believe I need a more drastic change to my process. I've sniffed around at Turbo C 2.01, DJGPP, DOSbox... not really too confident to go down any of those alleys without some outside input

like image 866
robisrob Avatar asked Jan 07 '15 23:01

robisrob


People also ask

Does Windows have inbuilt C compiler?

All Compilers & assemblers come as builtin with Windows without IDE and can be run from "the Windows Command prompt (cmd.exe)", so no extra downloads necessary; located in folder: C:\Windows\Microsoft.NET\Framework\vx.

Which C compiler is used in Windows?

If you want to run C or C++ programs in your Windows operating system, then you need to have the right compilers. The MinGW compiler is a well known and widely used software for installing GCC and G++ compilers for the C and C++ programming languages.


1 Answers

Run Virtual XP or VirtualBox and install Borland C++ inside. BTW, there is version 5.02 with some fixes (in case your version is exactly 5.0).

like image 110
i486 Avatar answered Oct 09 '22 01:10

i486