Operating System - HP-UX
1752723 Members
6397 Online
108789 Solutions
New Discussion

Re: aCC compile errors with size_t

 
athakur
Occasional Contributor

aCC compile errors with size_t

Hi,

I am trying to set up the compile for a few cpp files, within a set of existing C files using aCC. I got it to compile on HP Itanium, but on the RISC, I am getting the following errors. It looks like "size_t" is not defined, is there a way to get around this ? Or am I missing something here ?

Thank you very much for your help.

aCC -DHAVE_CONFIG_H -I. -I. -I../../src/engine -I../../src -I../../src/engine -AA +DA2.0W -c tokenMap.cpp -DPIC -o .libs/tokenMap.o
Error 422: "/usr/include/sys/pthread.h", line 452 # 'size_t' is used as a
type, but has not been defined as a type. Perhaps you meant 'bsize_t' as
in "typedef unsigned long bsize_t" ["/usr/include/sys/types.h", line 191].
size_t stk_stacksize;
^^^^^^
2 REPLIES 2
Steven Schweda
Honored Contributor

Re: aCC compile errors with size_t

I know nothing, but "size_t" should be
declared somewhere in the usual system header
files. I don't have an aCC on my PA-RISC
system, but I do see size_t in these:

/usr/include/sys/_size_t.h
/usr/include/sys/types.h

You might try adding a "-E" to the compiler
command line, to try to see what's killing
the normal declaration of size_t.
Dennis Handly
Acclaimed Contributor

Re: aCC compile errors with size_t

+DA2.0W should be replaced by +DD64.

std::size_t should be defined in <cstddef> and size_t in <stddef.h>.  But <pthread.h> should be including these.

 

>Steven: You might try adding a "-E" to the compiler command line

Yes, -E -.i. There is also -H to see the include hierarchy.

Though if an evil macro is messing this up, you may have to look harder.