Message-ID: <199807220938000230.00CC9904@pogwizd.tcs.uni.wroc.pl> In-Reply-To: References: Date: Wed, 22 Jul 1998 09:38:00 +0200 From: "Pawel Kowalski" To: eliz AT is DOT elta DOT co DOT il, pk AT tcs DOT uni DOT wroc DOT pl Cc: djgpp AT delorie DOT com Subject: Re: Compilation errors. Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Precedence: bulk *********** REPLY SEPARATOR *********** On 98-07-21, at 10:22, Eli Zaretskii wrote: >On Mon, 20 Jul 1998, Pawel Kowalski wrote: > >> I tried to compile a hudge project in Rhide (1,9 Mb of sources), and there >> were some errors I don't understand. First: >> >> file1.c >> ... >> void foo() >> {} >> ... >> >> file2.c >> ... >> foo(); >> ... >> and ld.exe says "Undefined reference to foo()" > >This could be because you have some installation snafu which prevents >the linker from receiving command lines longer than the DOS 127- >character limit. I don't think so. I have gcc 2.8.1 now. I tried to link 20 file project, and did it successfuly. (linker command line was longer than 127 characters) >> func1() is inside graph.c, func2() in graphics.c. >> ld.exe says: >> Error: graphics.o: In function `func1': >> graphics.c(48) Error: multiple definition of `func1' >> o:graph.c(57) Error: first defined here > >Please post at least the parts of code around the lines whose numbers >GCC prints in the error message(s). You don't expect us to be psychic >and guess the reason without seeing the code, do you? Ok, graphics.c: #47: int var1; /* ................ */ #48: (empty line) #49: int var2; /* ................ */ theese lines are not in any function. o:graph.c: (no such file) graph.c: #56: int gr_init(char driver, char mode) #57: { #58: free(gr_buffer); I checked it once more, and I'm sure now, that there are no same-name files in the project. (ie. graph.asm and graph.c)