My previous question has been answered, but now my even simpler
question is:
How do I execute the a.out (or otherwise named) executable from the
Red Hat 7.2 command line? With the executable a.out in the current
directory, I try typing a, a.out, ./a , ./a.out, and none of these
work. With my Windows version of gcc (from the Dev-C++), I just type
the name of the executable while I am in that directory.
Thanks for listening to these basic questions.
------------------ Reply Separator --------------------
Originally From: John Kilbourne <jki...@po...>
Subject: Re: Re: [Dev-C++] newbie question on header files
Date: 12/23/2001 08:34pm
Luigi et al:
My tiny program containing (little more than):
#include <iostream>
#include <string>
using namespace std
does not compile from my Redhat 7.2 command line. This is the same
program that now compiles on my windows gcc compiler.
I did find the files iostream and string in the
directory /usr/include/g++-3, and so used the -I switch on the
command g++ like so:
g++ -I/usr/include/g++-3 prog3.cpp
and got the same error message, referring to the undeclared
identifier 'string'. How do I set the environment variables in Linux
so the compiler can find this directory (and why wouldn't the distro
come with that environment variable already set)?
------------------ Reply Separator --------------------
Originally From: Luigi Santillo <gi...@li...>
Subject: Re: [Dev-C++] newbie question on header files
Date: 12/22/2001 07:00pm
Hi,
I think that the errors you get are related to the fact that "g++" is
unable to locate the C++ standard include files on your system, you
should
explicitly tell the place using the "-I" option.
If you plan to use "gcc" from the command line I suggest you look for
some
file describing the options. As Mr. Hardman says, there are many
places
where you can find such files, try the home page of Dev-C++, there
should
be some link, or try http://www.delorie.com/gnu/docs
In my opinion, before moving to Unix, be sure you know how to use an
editor
and also read something about "make" and "gdb".
As for other compilers, a good one (I mean pretty much ANSI
compliant, but
it works on Windows/Dos only) is the Borland one, you get it by
downloading
the Borland free command line tools package (see
http://www.borland.com,
and from there work your way to the right page). The package comes
with the
file bcb5tool.hlp that explains how to use the tools.
I myself use gcc (or bcc), most of the times, from the command line;
to
save me some typing I have developed two small, very simple programs
(one
for compiling a single file, the other for generating simple
makefiles),
they are available (as sources) at www.geocities.com/gisan1 follow
the link
clt_gnu. The programs use ANSI C(89), and it is not hard to modify
them so
that they can be ported to Unix (I will be writing a Linux port of
them
shortly after Christmas).If you need some help (or if you want the
binary
form of the programs), let me know: I'm a newbie myself, but I'll do
what I
can.
I hope the above is of some help.
At 15.21 20/12/01 -0500, John Kilbourne wrote:
>How do I compile on the command line using gcc, g++, or another
>compiler , circumventing Dev-C++ (which I relly like))?.
>Specifically, I receive errors b/c of my #include statements
>(<iostream> and <string>), which I understand to be
>somehow "standard". When I use <stdio.h>, my code compiles fine.
>
>I will be moving to unix where I will only have gcc and other unix
>tools, and I am trying to get oriented to that environment.
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
--
gisan
gi...@li...
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|