Date: Mon, 20 Jul 1998 11:13:27 +0300 (IDT) From: Eli Zaretskii To: Richard Lanyon cc: djgpp AT delorie DOT com Subject: Re: Undefined reference to `main' In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sun, 19 Jul 1998, Richard Lanyon wrote: > > What was the exact GCC command used to compile dsweep.o? > > gcc -Wall -c dsweep.c But this is a C++ program, right? (I assume this because you linked it with -lgpp.) If so, you should call the source file dsweep.cc or dsweep.cpp, otherwise GCC will compile it as a C program, and that could very well result in unresolved externals. > i) how do I link to libraries if they aren't called lib??.o (or lib??.so). > Can I just rename them You just mention the library names on the link command line, as if they were object files (but put them after all the object files). > (they're libraries compiled using Borland Turbo > Pascal 2.0)? This is in general impossible. You cannot link DJGPP programs with libraries or object files produced by other compilers. > ii) why is make behaving so strangely? I wasn't even aware that Make is part of this equation, since you never mentioned it. The only reason I could think of is that you used backslashes, and Make treats those as escape characters. Use forward slashes instead. If that doesn't help, you will have to tell more about the differences between invocation from the command-line and from Make.