From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7979 invoked by alias); 5 Dec 2006 08:06:07 -0000 Received: (qmail 7967 invoked by uid 22791); 5 Dec 2006 08:06:04 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.169) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 05 Dec 2006 08:05:56 +0000 Received: by ug-out-1314.google.com with SMTP id s2so2977107uge for ; Tue, 05 Dec 2006 00:05:54 -0800 (PST) Received: by 10.78.204.1 with SMTP id b1mr8641139hug.1165305953991; Tue, 05 Dec 2006 00:05:53 -0800 (PST) Received: by 10.78.100.10 with HTTP; Tue, 5 Dec 2006 00:05:53 -0800 (PST) Message-ID: <4ca029ac0612050005x257defafn7ce22898a33d277a@mail.gmail.com> Date: Tue, 05 Dec 2006 08:06:00 -0000 From: Purnendu To: abhivg Subject: Re: Help with g++ (Newbie) Cc: gcc-help@gcc.gnu.org In-Reply-To: <7693802.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7693802.post@talk.nabble.com> X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-12/txt/msg00052.txt.bz2 Hello, w.r.t >2) The errors I am getting are that it is not able to find the standard >include files like "math.h", etc. U need to compile with -lm option, i mean u need to link with the math library. ~ purnendu On 12/5/06, abhivg wrote: > > Hi, > > I am a total newbie to g++. I have a c++ project developed using the vc++ > IDE which I need to build using g++. I am using Arm Toolchain on win xp for > this. The c++ project was to develop a static library. So I think i need to > generate an archive file using the 'ar' tool. > > I have done the following: > 1) I have seperated all the header and source files from the vc project > 2) I was able to compile all the cpp files using g++. There were no errors. > 3) I generated the archive file using the 'ar' tool. The archive file also > got generated. > 4) I wrote a main.cpp file in which I will use the archive file > > Problems I am having: > 1) I tried to build the main.cpp file but it gave errors in the header file > included in main.cpp. This header file contains the functions that I have > exposed to access the methods in the archive file. So I tried to compile(??) > the some other header file and it gave me errors too. > 2) The errors I am getting are that it is not able to find the standard > include files like "math.h", etc. > > My doubts are: > 1) The header file that I have exposed is included in the archive file > generated. So how did the archive get compiled without any errors? > 2) Why is gcc not able to access the standard include files when compiling > header seperately but is able to access it when compiling cpp files? > 2) What does it mean when I do the following: "g++ somefile.h". Am I > compiling a header file??? > 3) Also how do I generate an exe instead of an .out file? > > -- > View this message in context: http://www.nabble.com/Help-with-g%2B%2B-%28Newbie%29-tf2759497.html#a7693802 > Sent from the gcc - Help mailing list archive at Nabble.com. > > -- with regards, purnendu ghosh ----------------------------------------------------------------------- If you can D.R.E.A.M it you can D.O it -----------------------------------------------------------------------