Mail Archives: djgpp/1996/08/13/02:38:30
On Mon, 12 Aug 1996, John M. Aldrich wrote:
> White wrote:
> >
> > I keep getting these code parsing errors when i try to compile a old
> > game i wrote for MS visual C 1.0. I think it has something to do with
> > the comment lines, but i cant seem to fix it.
> > I use comments like this ----> //comments here
> > I think it supports only this king----> /*comments here*/
>
> MS Visual C allows C++ style comments in C code, whereas DJGPP does not.
> There is a utility available to convert the comments to C-style, but I
> don't remember the location off-hand. Barring that, you can either change
> the comment style yourself or compile your program as a C++ program.
That is incorrect. GCC 2.7.0 and later also supports C++-style comments
in a C program. If the version of GCC that's used is earlier (DJGPP v2.0
comes with GCC 2.7.2), then there is a switch to GCC you can use to make
it support C++-style comments, like so:
gcc -c -Wp,-lang-c-c++-comments myprog.c
For more details on this, read section 8.3 of the DJGPP FAQ list
(available as v2/faq201b.zip from the same place you get DJGPP).
- Raw text -