Problem in types.h

Joined
Oct 4, 2009
Messages
2
Reaction score
0
Points
1
I am trying to compile a C++ code I am doing for my university, using g++. However, I see two problems that I just can`t find out the reason. The first one is "empty character constant", pointing to a line where I define 3 pointers to char.

The second and most incredible one is: "/usr/include/sys/types.h:84: error: expected ';' before 'typedef'"...

I've never done anything in this types.h file... And I`ve never had problems compiling other codes...

Does anyone has any idea of how to fix these mistakes????
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,762
Reaction score
2,100
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Show us the line of code with the 3 pointers and char.

Line 84 in types.h is:
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
typedef unsigned char u_char;

Regards
 
OP
J
Joined
Oct 4, 2009
Messages
2
Reaction score
0
Points
1
Thanks...
I've already fixed the first problem, with the char declaration. Now I only have to fix the types.h problem. I've checked in my types.h file, and it looks just like yours...

I can't find out why this problem is happening...
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top