LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-28-2003, 05:20 AM   #1
Lazarus
Member
 
Registered: Dec 2001
Location: Kent in UK
Distribution: Fedora 2
Posts: 170

Rep: Reputation: 30
gcc with dos target


I just wrote a program for my sister.
The program in in c and compiled with gcc.
Program worked ok but has to run under linux. Is it possible to compile it under linux so as to produce a dos executable she can run herself.

Last edited by Lazarus; 02-28-2003 at 05:22 AM.
 
Old 02-28-2003, 12:11 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
I haven't done anything with this, but I think what you want to do is cross-compile it for DOS (or Win32, whatever the case may be). Search around for cross compiling for details. The GCC homepage might have more information on how to do this, or maybe the gcc man pages.

Really, though, the best thing to do would be compile it under DOS, using a native compiler. Try DJGPP, if you have access to a DOS/Windows machine.
 
Old 03-01-2003, 04:45 AM   #3
Lazarus
Member
 
Registered: Dec 2001
Location: Kent in UK
Distribution: Fedora 2
Posts: 170

Original Poster
Rep: Reputation: 30
Thanks wapcaplet I will do as you suggest. I will explors to cross compile option first before I try to dig out my old dos compiler.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error building cross gcc-3.3.2 for i386-mingw32msvc target ugenn Linux - Software 2 10-05-2012 02:33 AM
MS-DOS to linux gcc mp4-10 Linux - Software 1 03-10-2005 03:45 PM
gcc-3.3.3 compling(configure-target-libiberty error 1) windus Linux - Software 0 04-18-2004 12:38 PM
Dos Emulator without Dos dtheorem Linux - Software 1 10-14-2003 01:18 PM
Dos Emulator without Dos dtheorem Linux - Software 1 10-14-2003 12:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration