Visual C++: syntax error when including gnutls.h

M

Maciek

All,

I'm having a problem building a library (VMime) with Visual .NET 2003.
It's including, among others, gnutls.h from the GNU TLS library and I'm
getting syntax errors in that file.

For example this line:

typedef ssize_t (*gnutls_pull_func) (gnutls_transport_ptr_t, void *,
size_t);

gives me this syntax error:

c:\Projects\dependencies\other\include\gnutls\gnutls.h(717): error
C2059: syntax error : ')'

I get all sorts of similar errors in header files included from MINGW
(like unistd.h) and other C libriaries. The problems is VMime should
compile with VC++ (it includes solution and project files for VC 2003).
I'd appreciate if someone could help me read those errors. I can
provide more output if this is not enough.

Thanks,
M.
 
A

Alf P. Steinbach

* Maciek:
All,

I'm having a problem building a library (VMime) with Visual .NET 2003.
It's including, among others, gnutls.h from the GNU TLS library and I'm
getting syntax errors in that file.

For example this line:

typedef ssize_t (*gnutls_pull_func) (gnutls_transport_ptr_t, void *,
size_t);

gives me this syntax error:

c:\Projects\dependencies\other\include\gnutls\gnutls.h(717): error
C2059: syntax error : ')'

I get all sorts of similar errors in header files included from MINGW
(like unistd.h) and other C libriaries. The problems is VMime should
compile with VC++ (it includes solution and project files for VC 2003).
I'd appreciate if someone could help me read those errors. I can
provide more output if this is not enough.

Sounds like the usual undefined identifier, i.e. you don't have the
right headers included with the right preprocessor definitions, so the
compiler complains about something irrelevant.
 
K

kwikius

Maciek said:
All,

I'm having a problem building a library (VMime) with Visual .NET 2003.
It's including, among others, gnutls.h from the GNU TLS library and I'm
getting syntax errors in that file.

For example this line:

typedef ssize_t (*gnutls_pull_func) (gnutls_transport_ptr_t, void *,
size_t);

gives me this syntax error:

c:\Projects\dependencies\other\include\gnutls\gnutls.h(717): error
C2059: syntax error : ')'

I get all sorts of similar errors in header files included from MINGW
(like unistd.h) and other C libriaries. The problems is VMime should
compile with VC++ (it includes solution and project files for VC 2003).
I'd appreciate if someone could help me read those errors. I can
provide more output if this is not enough.

Its a wild guess but you could try disabling language extensions in
VC++.

HTH

regards
Andy Little
 
M

Maciek

Sounds like the usual undefined identifier, i.e. you don't have the
right headers included with the right preprocessor definitions, so the
compiler complains about something irrelevant.

OK, some files where missing from the MINGW runtime, because I tried to
include them one by one.

It seems the real problem is that when I unclude MINGW runtime headers
into VC++ project, it doesn't compile - I get a lot of syntax errors.
Are there any settings for VC++ bo build MINGW headers? Or is it
possible at all?

Thanks,
M.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top