delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/02/01/01:10:54

From: dahms AT ifk20 DOT mach DOT uni-karlsruhe DOT de
Subject: Re: Syntax errors in standard Header files?
1 Feb 1997 01:10:54 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <009AF384.0D2E1EC0.8876.cygnus.gnu-win32@ifk20.mach.uni-karlsruhe.de>
Original-To: tomb AT nccn DOT net
Original-CC: gnu-win32 AT cygnus DOT com, dahms AT ifk20 DOT mach DOT uni-karlsruhe DOT de
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Hi, you wrote:

: The reason it won't work is because your file is named 'test.c'. If you
: name it 'test.cc' or 'test.cpp' or compile with the option to select c++
: (I'm not sure what it is)

It is -xc++

: > : bash$ gcc test.c -o test.exe
: > : In file included from \DEV\CYGNUS\include\g++/iostream.h:31,
: > :                  from test.c:1:
: > : \DEV\CYGNUS\include\g++/streambuf.h:35: syntax error before string constant
: > : In file included from \DEV\CYGNUS\include\g++/iostream.h:31,
: > :                  from test.c:1:
: > : \DEV\CYGNUS\include\g++/streambuf.h:37: syntax error before `}'

Sorry, I overlooked the use of gcc. That should be g++ or gxx.
Or use the flag. But why in the hell can it *find* g++ includes, when
it's not in c++ mode? There's no -I! Were any environment variables set?


Bye, Heribert (dahms AT ifk20 DOT mach DOT uni-karlsruhe DOT de)
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019