Mail Archives: djgpp/1998/09/09/22:00:45
Jason wrote in message <35F6D3AC DOT 108F9326 AT sandia DOT gov>...
>> > Anyway, here's my command line:
>> > E:\A\DJGPP\BIN\Gcc.exe -v -x c++ D:\C\HELLOW.C -o
D:\C\HELLOW.exe -lstdc
>> The problem is not with any of your syntax, it is that you are
using
>> "Hellow.c" as a filename and not "Hellow.cc" or "Hellow.cpp". GCC thinks
that
>> your file is strickly a "C" source file and therefore would not be able
to use
>> "iostream.h". Also, you should change "-lstdc" to "-lstdcxx" since you
are
>> using C++ and not C.
>
>Isn't *.C considered a C++ file and *.c considered a C file? Or is this
>just in UNIX?
Well, on Unix it depends on which compiler you are using but generally yes
you are right. However on Windows/ Dos/ Win95 /Win NT it doesn't work.
Windows and Dos are not FULLY case sensitive.
Try to create a file named "toto.c" then try creating a file named "TOTO.C"
you'll get an error stating that this name is already being used or it will
overwrite the first file.
Hence, on windows (and Dos) you absolutly need to use more than ".C" to tag
the file as being C++
Jean-François
>
>--JASON--
>
>--
> -----------------------------------------
>| ------------------------------------- |
>| | Jason Saavedra - Student and Psycho | |
>| | Sandia National Laboratories | |
>| | Albuquerque, NM | |
>| | ----------------------------------- | |
>| | Any insanities expressed are mine. | |
>| | (you may borrow, but please return) | |
>| ------------------------------------- |
> -----------------------------------------
- Raw text -