delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/12/08:13:17

Date: Sun, 12 May 1996 15:01:13 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Bruce W. Bodnyk" <bruceb AT bodnyk DOT microserve DOT com>
Cc: djgpp AT delorie DOT com
Subject: Re: Getting Started with DJGPP
In-Reply-To: <31958B0A.3F16@bodnyk.microserve.com>
Message-Id: <Pine.SUN.3.91.960512145737.26470A-100000@is>
Mime-Version: 1.0

On Sat, 11 May 1996, Bruce W. Bodnyk wrote:

> "hello world" program. Running it through gcc I get an executable but
> when I attempt to run the executable in a dos window under Windows 3.1
> I get the following error
> 
> "This application has violated system integrety due to an invalid
> fault and will be terminated."

You probably tried to run the COFF file which the GNU linker emits.  DOS 
doesn't know how to run such files, so you must prepend a small DOS stub 
to it.  Do this:

	gcc -o hello hello.c
	coff2exe hello

After that you should have hello.exe that you can run.

(Btw, this is all explained in the DJGPP FAQ list, so if EZ-GCC includes 
it, be sure to read it.  If not, you can get it as faq102.zip from any 
SimTel mirror, directory SimTel/vendors/djgpp/v1.)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019