* Make Executable File
@ 1999-11-25 17:26 Mike White
1999-11-26 1:13 ` Jan Dvorak
1999-11-30 23:28 ` Mike White
0 siblings, 2 replies; 4+ messages in thread
From: Mike White @ 1999-11-25 17:26 UTC (permalink / raw)
To: help-gcc
I'm just starting to learn C++ and the G++ compiler. I have been
able to write and compile a couple of programs successfully, but
for the life of me I can't find out how to make the resulting object file
an executable. While using DJGPP through DOS it creates the
executables automatically. The problem I"m having is using G++
under Linux. I've read man pages and info files until my eyes
crossed. Could someone please help me get my eyes back in
focus by pointing me to the information I need?
J. Michael White
Lorena, Texas
jmwhite@mail.hot1.net
http://genealogy.org/~mwhite
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Make Executable File
1999-11-25 17:26 Make Executable File Mike White
@ 1999-11-26 1:13 ` Jan Dvorak
1999-11-30 23:28 ` Jan Dvorak
1999-11-30 23:28 ` Mike White
1 sibling, 1 reply; 4+ messages in thread
From: Jan Dvorak @ 1999-11-26 1:13 UTC (permalink / raw)
To: Mike White; +Cc: help-gcc
On Thu, 25 Nov 1999, Mike White wrote:
> I'm just starting to learn C++ and the G++ compiler. I have been
> able to write and compile a couple of programs successfully, but
> for the life of me I can't find out how to make the resulting object file
> an executable. While using DJGPP through DOS it creates the
> executables automatically. The problem I"m having is using G++
> under Linux. I've read man pages and info files until my eyes
> crossed. Could someone please help me get my eyes back in
> focus by pointing me to the information I need?
>
>
> J. Michael White
> Lorena, Texas
> jmwhite@mail.hot1.net
> http://genealogy.org/~mwhite
>
Well, this can be caused by many things. First, make sure, that code is
ok, and compiler compiled it ok (no error messages etc). Second, make sure
that you don't set the '-c' option (which means stop after compile and DO
NOT link). Third, look if you have included '-o' option - the name of
resulting executable. (Without that, the executable will be named
'a.out') So, with all this the syntax for compiling should be:
g++ program.c -o program
This will create file 'program'. You can run it by typing:
./program
(remember, that in linux you nedd to type leading './' when you are
running programs which are in current directory (and that directory is not
in path)
Happy coding
Jan Dvorak
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Make Executable File
1999-11-26 1:13 ` Jan Dvorak
@ 1999-11-30 23:28 ` Jan Dvorak
0 siblings, 0 replies; 4+ messages in thread
From: Jan Dvorak @ 1999-11-30 23:28 UTC (permalink / raw)
To: Mike White; +Cc: help-gcc
On Thu, 25 Nov 1999, Mike White wrote:
> I'm just starting to learn C++ and the G++ compiler. I have been
> able to write and compile a couple of programs successfully, but
> for the life of me I can't find out how to make the resulting object file
> an executable. While using DJGPP through DOS it creates the
> executables automatically. The problem I"m having is using G++
> under Linux. I've read man pages and info files until my eyes
> crossed. Could someone please help me get my eyes back in
> focus by pointing me to the information I need?
>
>
> J. Michael White
> Lorena, Texas
> jmwhite@mail.hot1.net
> http://genealogy.org/~mwhite
>
Well, this can be caused by many things. First, make sure, that code is
ok, and compiler compiled it ok (no error messages etc). Second, make sure
that you don't set the '-c' option (which means stop after compile and DO
NOT link). Third, look if you have included '-o' option - the name of
resulting executable. (Without that, the executable will be named
'a.out') So, with all this the syntax for compiling should be:
g++ program.c -o program
This will create file 'program'. You can run it by typing:
./program
(remember, that in linux you nedd to type leading './' when you are
running programs which are in current directory (and that directory is not
in path)
Happy coding
Jan Dvorak
^ permalink raw reply [flat|nested] 4+ messages in thread
* Make Executable File
1999-11-25 17:26 Make Executable File Mike White
1999-11-26 1:13 ` Jan Dvorak
@ 1999-11-30 23:28 ` Mike White
1 sibling, 0 replies; 4+ messages in thread
From: Mike White @ 1999-11-30 23:28 UTC (permalink / raw)
To: help-gcc
I'm just starting to learn C++ and the G++ compiler. I have been
able to write and compile a couple of programs successfully, but
for the life of me I can't find out how to make the resulting object file
an executable. While using DJGPP through DOS it creates the
executables automatically. The problem I"m having is using G++
under Linux. I've read man pages and info files until my eyes
crossed. Could someone please help me get my eyes back in
focus by pointing me to the information I need?
J. Michael White
Lorena, Texas
jmwhite@mail.hot1.net
http://genealogy.org/~mwhite
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-11-30 23:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-25 17:26 Make Executable File Mike White
1999-11-26 1:13 ` Jan Dvorak
1999-11-30 23:28 ` Jan Dvorak
1999-11-30 23:28 ` Mike White
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).