Re: Help with g++ (Newbie)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



abhivg <abhi.vg@xxxxxxxxx> writes:

> 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", <vector> etc.

Tell us the precise command that you ran and the precise output that
you got.  We can't guess.


> 2) What does it mean when I do the following: "g++ somefile.h".   Am I
> compiling a header file???

That means to precompile a header file.  See the "Using Precompiled
Headers" section in the documentation.


> 3) Also how do I generate an exe instead of an .out file?

I assume that by "an exe" you mean an executable file (the default
name on Unix is "a.out", but you can call it anything you like;
executable files generally have no extension on Unix).  g++ will
generate this by default.  For example "g++ hello.cc" will generate
the executable file "a.out".

I assume that by "an .out file" you mean an object file (on Unix these
usually have an extension of ".o").  g++ will generate that if you use
the -c option.  See the documentation.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux