public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* g++
@ 2002-04-06  6:27 Gregor Karzelek
  2002-04-06 13:38 ` g++ bjorn rohde jensen
  0 siblings, 1 reply; 6+ messages in thread
From: Gregor Karzelek @ 2002-04-06  6:27 UTC (permalink / raw)
  To: gcc-help

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.

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

* Re: g++
  2002-04-06  6:27 g++ Gregor Karzelek
@ 2002-04-06 13:38 ` bjorn rohde jensen
  0 siblings, 0 replies; 6+ messages in thread
From: bjorn rohde jensen @ 2002-04-06 13:38 UTC (permalink / raw)
  To: gcc-help

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.

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

* RE: G++
       [not found] <616BE6A276E3714788D2AC35C40CD18D5B1B94@whale.softwire.co.uk>
@ 2002-04-09  6:11 ` Rupert Wood
  0 siblings, 0 replies; 6+ messages in thread
From: Rupert Wood @ 2002-04-09  6:11 UTC (permalink / raw)
  To: gregor; +Cc: gcc-help

Gregor Karzelek wrote:

> How can I say to g++ that he should print out the errors in a
> file not in the stdout (=screen)?

It outputs errors to stderr not stdout. stderr has file descriptor 2;
you could use shell redirects, e.g.:

    g++ -c foo.cc -o foo.o 2>errorfile

> If I want to compile a X.o from a X.cpp shall I use gcc or g++?
> Both do it, but what shall i Rather use?

The main differences between g++ and gcc are that g++ will compile .c
files as if they were C++ and that g++ automatically includes libstdc++
when it is asked to link. You should use g++ for your link step.

Rup.

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

* G++
@ 2002-04-09  5:33 Gregor Karzelek
  0 siblings, 0 replies; 6+ messages in thread
From: Gregor Karzelek @ 2002-04-09  5:33 UTC (permalink / raw)
  To: gcc-help

Hi Guys
How can I say to g++ that he should print out the errors in a
file not in the stdout (=screen)?

And: 
If I want to compile a X.o from a X.cpp shall I use gcc or g++?
Both do it, but what shall i Rather use?
Or shouldn't I mind about it?

Greetings
Gregor

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

* Re: g++
  2002-04-06  5:55 g++ Gregor Karzelek
@ 2002-04-06  6:06 ` bjorn rohde jensen
  0 siblings, 0 replies; 6+ messages in thread
From: bjorn rohde jensen @ 2002-04-06  6:06 UTC (permalink / raw)
  To: gcc-help

Hi Gregor,

 This is the right place to ask about g++ too. GCC is
more than just the C compiler;)

Yours sincerely,

Bjorn

Gregor Karzelek wrote:
> 
>  Hi Guys,
>  I have a little problem with the g++ and wanted at first to ask if such
>  question belong to this ML too or not.
>  (I haven't found a g++-ML so I think so, but I'm not sure)
> 
>  When this will be answered I ask my reall question
> 
>  Greetings,
>  Gregor

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

* Re: g++
@ 2002-04-06  5:55 Gregor Karzelek
  2002-04-06  6:06 ` g++ bjorn rohde jensen
  0 siblings, 1 reply; 6+ messages in thread
From: Gregor Karzelek @ 2002-04-06  5:55 UTC (permalink / raw)
  To: gcc-help

 Hi Guys,
 I have a little problem with the g++ and wanted at first to ask if such
 question belong to this ML too or not.
 (I haven't found a g++-ML so I think so, but I'm not sure)

 When this will be answered I ask my reall question

 Greetings,
 Gregor

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

end of thread, other threads:[~2002-04-09 12:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-06  6:27 g++ Gregor Karzelek
2002-04-06 13:38 ` g++ bjorn rohde jensen
     [not found] <616BE6A276E3714788D2AC35C40CD18D5B1B94@whale.softwire.co.uk>
2002-04-09  6:11 ` G++ Rupert Wood
  -- strict thread matches above, loose matches on Subject: below --
2002-04-09  5:33 G++ Gregor Karzelek
2002-04-06  5:55 g++ Gregor Karzelek
2002-04-06  6:06 ` g++ bjorn rohde jensen

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).