[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cannot include cthreads.h into C++

one thing you can try is something like
#define catch c_catch
#include <cthreads.h>
#undefine catch

im not certain if undefine is the proper preprocessor keyword, but you get
the idea


I wrote my first Hurd program yesterday :) but I was not able to compile it
first: because I am used to C++ programming I named the source file "1.cc".
But I could not compile it when there was "cthreads.h" included. The
compiler claimed that there is some "parse error before catch". I looked
into cthreads.h and found out that there is a structure with a member named
"catch". But catch is a reserved word of C++ ! When I renamed the file
"1.cc" to "1.c" everything compiled fine. Is it correct to name a variable
like a C++ reserved words ? Is this a bug or a feature ? Or is there some
way how to compile C++ sources under Hurd ?

Ondrej Hurt

To UNSUBSCRIBE, email to debian-hurd-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact

Reply to: