[clug-talk] C++ compiler

Robert Lewko lewkor at gmail.com
Wed May 20 20:15:27 PDT 2009


On Wed, May 20, 2009 at 9:07 PM, Kyle Newton <kdnewton at gmail.com> wrote:

> Your ramblings were superfluous and lacked substance!
>
> Kidding. That's me being a smart-alek. You asked to comment on your
> ramblings...
>
> Though this is based on Ubuntu (and possibly not your distro of choice) you
> may find this tutorial useful.
>
>
> http://www.ubuntugeek.com/how-to-install-c-andBloodrock-c-compilers-in-ubuntu-and-testing-your-first-c-and-c-program.html<http://www.ubuntugeek.com/how-to-install-c-and-c-compilers-in-ubuntu-and-testing-your-first-c-and-c-program.html>
>
> And yes, I believe it's g++ as well.


Incidentally, if you read this link they have a really bad suggestion.  They
suggest running the command:

g++ first.cpp -o test

Why naming a program of yours test is a bad idea is that there is a program
on the system named test.  The only thing that the system command named test
does is evaluate its command line and return a status - ie. it does not give
any output.  If you enter the command:

test

you will get the system command, not  your own.  You will be expecting
output which you will never see.

If you have a program named test you have to enter

./test

otherwise you  will get the system command and spend hours wondering why
your program is not working!

For you experts I know that you can put '.' in your PATH variable to get the
one in your current directory.  Depending on what you are developing, that
is a really bad idea.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://clug.ca/pipermail/clug-talk_clug.ca/attachments/20090520/c4530298/attachment.html>


More information about the clug-talk mailing list