From: "Jean-Francois Tremblay" Newsgroups: comp.lang.c++,comp.os.msdos.djgpp References: <01bddab6$7b68a300$LocalHost AT jonadab> <35F47DAC DOT E8A1878B AT unb DOT ca> <35F6D3AC DOT 108F9326 AT sandia DOT gov> Subject: Re: Newbie Question regarding include Lines: 49 Message-ID: <9bGJ1.1664$sr.2366345@weber.videotron.net> Date: Wed, 9 Sep 1998 21:44:28 -0400 NNTP-Posting-Host: 207.253.121.230 NNTP-Posting-Date: Wed, 09 Sep 1998 21:45:41 EDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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) | | >| ------------------------------------- | > -----------------------------------------