delorie.com/archives/browse.cgi | search |
From: | ams AT ludd DOT luth DOT se (Martin Str|mberg) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: HELP: Linker hates me! |
Date: | 4 May 1998 21:43:49 GMT |
Organization: | University of Lulea, Sweden |
Lines: | 34 |
Message-ID: | <6ilcql$8e3$1@news.luth.se> |
References: | <354E35F1 DOT 4EE71278 AT sprynet DOT com> |
NNTP-Posting-Host: | my21.sm.luth.se |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Ishpeck (aTedjamulia AT sprynet DOT com) wrote: : #MAIN.CC# : : int foo(void); : : void main(void){ : int returnval; : do{ : returnval=foo(); : }while(returnval==0); : } : : # END OF MAIN.CC # : #STUFF.CC# : int foo(void){ : return 7; : } : #END STUFF.CC# Well I don't have any problems with that code: descartes:/tmp> gcc -Wall main.cc stuff.cc main.cc:3: warning: return type for `main' changed to integer type However this is more interresting: descartes:/tmp> gcc -Wall main.cc stuff.c main.cc:3: warning: return type for `main' changed to integer type /tmp/cca125441.o: In function `main': /tmp/cca125441.o(.text+0x8): undefined reference to `foo(void)' Thanks, MartinS
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |