www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/04/08:06:30

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP wierd compilation error
Date: Wed, 02 Jul 1997 19:10:16 -0700
Organization: Alcyone Systems
Lines: 31
Message-ID: <33BB0A08.5BD7AA50@alcyone.com>
References: <33B775B9 DOT D567D103 AT wayfarer DOT demon DOT co DOT uk>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Dan wrote:

> Basically, on compilation, the syntax checker does not notice mis-typed
> library function calls, for example 'helloworld()' instead of
> 'hello_world()'.

It sounds like this is correct behavior, although I'm not quite sure of
exactly what you're asking.  If you mistype function names, then
necessarily things will not work -- it's not the compiler's job to figure
out what you might mean when you make a typo (and missing an underscore is
a typo), it's up to the programmer.

> I can then compile and link the program, which then
> obviously crashes on execution, due to a call to the non-existent
> 'helloworld()' function.

A non-existent function should result in the link phase failing.

One possibility is that you're using standard library functions (like
malloc/free in stdlib.h) without including the appropriate header.

I suspect there's something more fundamentally wrong with what you're
doing, but it's hard to guess without more information.

-- 
       Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
                     Alcyone Systems /   web / http://www.alcyone.com/max/
San Jose, California, United States /  icbm / 37 20 07 N  121 53 38 W
                                   \
     "Covenants without the sword / are but words."
                                 / Camden

- Raw text -


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