Date: Mon, 6 Mar 2000 09:41:15 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: caramaith cc: djgpp AT delorie DOT com Subject: Re: odd compiler error in DJGPP... In-Reply-To: <38C307A8.6F680858@myokay.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 6 Mar 2000, caramaith wrote: > I get this when just doing the normal > > gcc -o CppLibTest.exe CppLibTest.cpp This is wrong. Try this: gcc -o CppLibTest.exe CppLibTest.cpp CppLib.o You *must* submit all the relevant source/object files to GCC, otherwise how do you expect the linker to find code you put into CppLib.cpp? > He said I had to state every source file... even the > CppLib.cpp (which is the object-file to CppLib.h, the header-file > naturally enclosed in CppLibTest.cpp). The header files doesn't include anything except the text that you see inside that header file. It does NOT magically pull in the code of CppLib.cpp, because that's a different file. > Is this really the case??? Yes, that's the case.