Subject: Re: quastion about C++
From: [email-masked] (Scott Warner)

3 Nov 1997 05:01:02 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: 8bit
To: <[email-masked]>

Andrew,

Look through the recent messages, this has been addressed.  It sounds like
a problem with your environmental variables.  However, moving files around
might affect where gcc expects to find the includes.  But, yes, you can use
g++ to compile programs.  The general syntax is

g++ -o foo.exe foo.cpp

for one file or

g++ -c -o foo.o foo.cpp
g++ -c -o bar.o bar.cpp
g++ -o foobar.exe foo.o bar.o

for larger files requiring multiple objects.  See the file gcc.info for a
more.

----------
> From: Andrew Lipnitsky <[email-masked]>
> To: [email-masked]
> Cc: [email-masked]
> Subject: Re: quastion about C++
> Date: Sunday, November 02, 1997 8:42 AM
> 
> [email-masked] wrote:
> 
> >   Hello.
> >
> >   I send an e-mail to this address for the first time,
> > so plese execuse me if my expression is not proper.
> > The answer might be found in any documents, but I am not
> > a native speaker. I've done all what I can do. Please help me.
> >
> >   I downloaded "cdk.exe" from "http://www.cygnus.com/"
> > and installed. I found out how to compile C programs. Now,
> > I want to compile a program written in C++ language.
> > but when I write
> > > g++ hello.cpp
> > onto the command line, the compiler say like this...
> >
> > hello.cpp:1: iostream.h: No such file or directory
> > G__~1.EXE: Internal compiler error: program cpp got fatal signal 33
> >
> > What I've done is...-------------------------------------------------
> >
> > 1.Installed cdk.exe to C:/use/cygnus
> >
> > 2.Moved "bin","etc","i386-cygwin32","lib","exec" folder that were
> > under
> > H-i386-cygwin32 to C:/usr/cygnus for convenience
> >
> > 3.Wrote those sentence in "Autoexec.bat"
> >
> > SET PATH=%PATH%;C:/usr/cygnus/bin
> > set HOME=c:/home/toshi
> > SET GCC_EXEC_PREFIX=/usr/cygnus/lib/gcc-lib/
> > ---------------------------------------------------------------------
> >
> > That's all. Is it possible to compile C++ program by using
> > "g++.exe"? If it is possible, please let me know how to setup.
> > Not only I, but also a lot of  my classmates of my university
> > want to use C++ program.
> >
> >   Thank you.
> >
> >  　　　　　　　　　Toshi
> > YAMASAKI([email-masked])
> > 
> >
> 
>    Hello JToshi!
> 
> I had the same problem.
> I  have solved It   by the procedure:
> 
> 1. I  copied all * .h files from the catalogues
> gnuwin32/b18/include/,
> gnuwin32/b18/H-i386-cygwin32/i386-cygwin32/include/,
>
gnuwin32/b18/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-970404/i
nclude/
> 
> In the catalogue /usr/include/, keeping  structure of subdirectories.
> 2. At compilation I use such command line :
> g++ -I/usr/include hello.cpp
> 
> Best regards.
> 
> -
> For help on using this list (especially unsubscribing), send a message to
> "[email-masked]" with one line of text: "help".
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".