Re: [Anjuta-list] Executables
- From: Curtis Magyar <cumagyar mts net>
- To: Robert Hastings <bobhastings sbcglobal net>
- Cc: anjuta-list lists sourceforge net
- Subject: Re: [Anjuta-list] Executables
- Date: Sun Dec 28 14:50:05 2003
On Sun, 2003-12-28 at 14:15, Robert Hastings wrote:
> I tried compiling a simple hello program in C++ but Anjuta isn't
> creating an executable file. I've tried the compile and build options
> and I get a message in the lower window saying "Compiling file:
> main.cc..." The next line shows
>
> g++ -Wall -O1 -g -c "main.cc" -o "main.o"
>
> This is all the output that I get. Is G++ getting hung up somewhere?
> I've tried compiling this manually from a command shell and it does
> generate an object file.
>
> ______________________________________________________________________
The -c flag to g++ tells it to stop before the linking is done, so all
you get is a compiled .o file. That is desirable when you have multiple
.o's that make up your final executable. From your terminal you could
link it with the command:
g++ main.o -o main
And you will end up with an executable called 'main'.
I located a small intro to gcc that explains this better I think.
http://galton.uchicago.edu/~gosset/Compdocs/gcc.html
Hope this helps.
> avast! Antivirus: Outbound message clean.
>
> Virus Database (VPS): 12/28/2003
> Tested on: 12/28/2003 2:15:47 PM
> avast! is copyright (c) 2000-2003 ALWIL Software.
>
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]