Computing.Net > Forums > Linux > C++ under Linux

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

C++ under Linux

Reply to Message Icon

Name: Syukri
Date: February 4, 2001 at 09:37:12 Pacific
Comment:

I have installed Linux Redhat 7.0.. the problem is how to use g++ (C++ compiler)? I compiled a C++ file and a file, a.out was created. The problem is when I type 'a.out', the prompt didn't run the program but printed "bash command"? What's wrong? Is there something that I don't know? HELP! HELP!



Sponsored Link
Ads by Google

Response Number 1
Name: opid
Date: February 4, 2001 at 11:58:23 Pacific
Reply:

hello. I asked this same question a couple of days back and it's been answered. just scroll your screen downwards a little bit and you'll see the topic" linux and the C++ compiler" Thre the answer lies.


Opid


0

Response Number 2
Name: Blair
Date: February 6, 2001 at 23:41:06 Pacific
Reply:

A link you should read:

http://www.armed.net/how/pg002672.htm

a.out vs. elf is like vi vs. emacs, or kde vs. gnome. Use what works for u.



0

Response Number 3
Name: Kerim BASOL
Date: February 21, 2001 at 05:32:36 Pacific
Reply:

If you want to run your command from your
path you must use "./" before the command
like this:

$ ./a.out

Compiling:
_________________
$ g++ myprog.cc
$ ./a.out
Hello, World
$ _
-----------------
OR you can change your output name
_________________
$ g++ myprog.cc -o youroutput
$ ./youroutput
Hello, World
$
You can use lots of parameters with GNU
Compiler you can learn more parameter from
command line just type

$ man g++


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: C++ under Linux

disable CRTL+C under console in linux www.computing.net/answers/linux/disable-crtlc-under-console-in-linux/1625.html

disable CRTL+C in console under linux www.computing.net/answers/linux/disable-crtlc-in-console-under-linux/1626.html

Using a network card under linux www.computing.net/answers/linux/using-a-network-card-under-linux/9190.html