From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25030 invoked by alias); 6 Apr 2002 14:27:57 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 25018 invoked from network); 6 Apr 2002 14:27:53 -0000 Received: from unknown (HELO fepD.post.tele.dk) (195.41.46.149) by sources.redhat.com with SMTP; 6 Apr 2002 14:27:53 -0000 Received: from tdcadsl.dk ([80.62.84.198]) by fepD.post.tele.dk (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP id <20020406142752.INLN24710.fepD.post.tele.dk@tdcadsl.dk> for ; Sat, 6 Apr 2002 16:27:52 +0200 Message-ID: <3CAF0588.999E7687@tdcadsl.dk> Date: Sat, 06 Apr 2002 13:38:00 -0000 From: bjorn rohde jensen Reply-To: shamus@tdcadsl.dk X-Accept-Language: en MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: g++ References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00065.txt.bz2 Hi Gregor, The -L option is for specifying extra directories with libraries during linking. You probably also want to specify a number of libraries to link agains using the -l option. Have a look at the man pages on gcc. Yours sincerely, Bjorn Gregor Karzelek wrote: > > Hi Guys, > ok, here comes my real problem: > > I'm just trying to walk trough the QT-Tutorial and there I have to compile > more than one file into a binary. > > The commands I have to use is: > $ g++ -L/foo/ -I/bar/ -c file1.cpp > $ g++ -L/foo/ -I/bar/ -c file2.cpp > and at last: > $ g++ -o endfile file1.o file2.o > > Or have I forgott something? > Because the first to commands he do properly but when I want to compile the > real binary he tells that nearly the whole X.o is wrong. > Should I add a token or what could it be? > > Greetings > Gregor > > PS: > Yes, you're right, I have just started to program > PPS: > I will send the error the g++ give out soon to this list.