public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc seems okay but g++ not able to get path to compile
@ 2010-09-16 21:04 gagan1
  2010-09-16 23:35 ` Philip Herron
  0 siblings, 1 reply; 2+ messages in thread
From: gagan1 @ 2010-09-16 21:04 UTC (permalink / raw)
  To: gcc-help


Chaps,
              Is that some different way in which g++ needs path information
for the source cpp & header file to get compiled.

I am trying to compile a code with GCC. Since it is c++ code. It appears g++
is automatically get invoked
So while the gcc is okay but g++ compliains about no file or directory error

I copy the file and put in same location from where I am running the
makefile.

This seems to work but now all the system header files that are listed in
that cpp file is missing as per g++!!!

I don't think it is goo idea to copy all system or no system header files in
same folder to get g++ work. Thier should be some way to let g++ know the
path

At the moment in my standard makefile I am using flag -I to include header
files

any suggestion /thoughts are apprictiated
 

-- 
View this message in context: http://old.nabble.com/gcc-seems-okay-but-g%2B%2B-not-able-to-get-path-to-compile-tp29732952p29732952.html
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gcc seems okay but g++ not able to get path to compile
  2010-09-16 21:04 gcc seems okay but g++ not able to get path to compile gagan1
@ 2010-09-16 23:35 ` Philip Herron
  0 siblings, 0 replies; 2+ messages in thread
From: Philip Herron @ 2010-09-16 23:35 UTC (permalink / raw)
  To: gagan1; +Cc: gcc-help

On 16 September 2010 22:04, gagan1 <gagan2172@yahoo.com> wrote:
>
> Chaps,
>              Is that some different way in which g++ needs path information
> for the source cpp & header file to get compiled.
>
> I am trying to compile a code with GCC. Since it is c++ code. It appears g++
> is automatically get invoked
> So while the gcc is okay but g++ compliains about no file or directory error

What platform are you running on?

>
> I copy the file and put in same location from where I am running the
> makefile.

You mean you copied system headers into your src directory?

>
> This seems to work but now all the system header files that are listed in
> that cpp file is missing as per g++!!!
>

If all your using is standard system headers g++ should pick them up
as per defaults in /usr/include

> I don't think it is goo idea to copy all system or no system header files in
> same folder to get g++ work. Thier should be some way to let g++ know the
> path
>

nope

> At the moment in my standard makefile I am using flag -I to include header
> files
>

Define standard i don't think there is a "standard makefile". What
options are you using to invoke gcc. We need an example of what your
trying to do so we can help. So show us a small test case of the
failing code and what your gcc options are etc.

--Phil

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-16 23:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-16 21:04 gcc seems okay but g++ not able to get path to compile gagan1
2010-09-16 23:35 ` Philip Herron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).