Mail Archives: djgpp/1997/07/04/08:06:30
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 -