This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g++ compilation errors ...


Hi ...

I just tried to write my first little program in c++ and encountered the
following :

The code looks like this :
///
void main ()

#include <sys/types.h>
#include <dirent.h>


{
  return 0;
}
///

compilation with g++ gizmo.cc gives me the following error messages :

///
BASH.EXE-2.02$ c++ gizmo.cc
C:\\CYGNUS\\CYGWIN~1\\H-I586~1\\BIN\\..\\lib\\gcc-lib\\i586-cygwin32\\egcs-2
.91.
57\\..\\..\\..\\..\\i586-cygwin32\\include\\dirent.h: In function `int
main(...)
':
In file included from gizmo.cc:17:
C:\\CYGNUS\\CYGWIN~1\\H-I586~1\\BIN\\..\\lib\\gcc-lib\\i586-cygwin32\\egcs-2
.91.
57\\..\\..\\..\\..\\i586-cygwin32\\include\\dirent.h:2: parse error before
strin
g constant
gizmo.cc:19: parse error before `{'
gizmo.cc:21: confused by earlier errors, bailing out
///

I don't know whether I do something completely wrong, but it looks like a
bug to me (correct me if I'm wrong ;-)


Greetings
  mxs 
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]