# errors while compiling c++ module

**URL:** <https://community.unix.com/t/errors-while-compiling-c-module/196132>\
**Category:** HP-UX\
**Created:** [May 8, 2008, 5:22am UTC](https://community.unix.com/t/errors-while-compiling-c-module/196132 "2008-05-08T05:22:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mannam\_srinivas](https://community.unix.com/letter_avatar/mannam_srinivas/32/5_5575768a8748004e209b776fc1b2916d.png) [@mannam\_srinivas](https://community.unix.com/u/mannam_srinivas)\
**Post date:** [May 8, 2008, 5:22am UTC](https://community.unix.com/t/errors-while-compiling-c-module/196132/1 "2008-05-08T05:22:59Z")

</div>

hello everyone,

here i attempting to compile a c++ module .  
I am using the following command  
make -d dummyCHARGP.

i am using the gcc compiler .my os is HP-UX 11.11.  
here i am getting the following errors.

# errors:

/swtemp/usbs/cc/unix-ce/root/subsys/include/main.h:146: error: expected ';' before '_' token  
/swtemp/usbs/cc/unix-ce/root/subsys/include/main.h:150: error: 'boolean32' does not name a type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/main.h:161: error: 'unsigned32' does not name a type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/main.h:167: error: 'pthread\_addr\_t' does not name a type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/main.h:174: error: variable or field 'main\_f3\_wait\_state' declared void  
/swtemp/usbs/cc/unix-ce/root/subsys/include/main.h:174: error: 't\_main\_proc\_state' was not declared in this scope  
/swtemp/usbs/cc/unix-ce/root/subsys/include/ocdx\_export.h:89: error: 'unsigned32' has not been declared  
/swtemp/usbs/cc/unix-ce/root/subsys/include/ocdx\_export.h:92: error: 'unsigned32' has not been declared  
/swtemp/usbs/cc/unix-ce/root/subsys/include/ocdx\_export.h:128: error: 'unsigned32' has not been declared  
/swtemp/usbs/cc/unix-ce/root/subsys/include/ocdx\_export.h:132: error: 'unsigned32' has not been declared  
/swtemp/usbs/cc/unix-ce/root/subsys/include/ocdx\_export.h:173: error: 'unsigned32' has not been declared  
/swtemp/usbs/cc/unix-ce/root/subsys/include/ocdx\_export.h:177: error: 'unsigned32' has not been declared  
/swtemp/usbs/cc/unix-ce/root/subsys/include/ocdx\_export.h:266: error: 'unsigned32' has not been declared  
/swtemp/usbs/cc/unix-ce/root/subsys/include/ocdx\_export.h:272: error: 'unsigned32' has not been declared  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:36: error: 'rpc\_binding\_handle\_t' does not name a type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:37: error: 'uuid\_t' does not name a type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:38: error: ISO C++ forbids declaration of 'unsigned\_char\_t' with no type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:38: error: expected ';' before '_' token  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:42: error: typedef 'UDCE\_CLEANUP\_FUNCTION' is initialized (use \_\_typeof\_\_ instead)  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:42: error: 'unsigned32' was not declared in this scope  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:141: error: expected initializer before '_' token  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:170: error: expected ',' or '...' before 'i1\_dummy'  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:170: error: ISO C++ forbids declaration of 'unsigned32' with no type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:239: error: expected ',' or '...' before '_' token  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:240: error: ISO C++ forbids declaration of 'udce\_t\_rpc\_interface' with no type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:277: error: expected ',' or '...' before 'i1\_if\_handle'  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:282: error: ISO C++ forbids declaration of 'rpc\_if\_handle\_t' with no type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:317: error: expected ',' or '...' before 'i1\_if\_handle'  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:321: error: ISO C++ forbids declaration of 'rpc\_if\_handle\_t' with no type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:392: error: expected ',' or '...' before 'i1\_if\_handle'  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:396: error: ISO C++ forbids declaration of 'rpc\_if\_handle\_t' with no type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:426: error: expected ',' or '...' before 'i1\_if\_handle'  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:429: error: ISO C++ forbids declaration of 'rpc\_if\_handle\_t' with no type  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:481: error: expected ',' or '...' before 'i1\_if\_handle'  
/swtemp/usbs/cc/unix-ce/root/subsys/include/udcex\_export.h:486: error: ISO C++ forbids declaration of 'rpc\_if\_handle\_t' with no type  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h: In function 'int \_\_gthread\_mutex\_lock(\_\_gthread\_mutex\_t\*)':  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h:549: error: request for member 'field2' in 'pthread\_self()', which is of non-class type 'pthread\_t'  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h:549: error: 'pthd4\_mutex\_lock' was not declared in this scope  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h:549: error: request for member 'field2' in 'pthread\_self()', which is of non-class type 'pthread\_t'  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h: In function 'int \_\_gthread\_mutex\_trylock(\_\_gthread\_mutex\_t\*)':  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h:558: error: request for member 'field2' in 'pthread\_self()', which is of non-class type 'pthread\_t'  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h:558: error: 'pthd4\_mutex\_trylock' was not declared in this scope  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h:558: error: request for member 'field2' in 'pthread\_self()', which is of non-class type 'pthread\_t'  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h: In function 'int \_\_gthread\_mutex\_unlock(\_\_gthread\_mutex\_t\*)':  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h:567: error: request for member 'field2' in 'pthread\_self()', which is of non-class type 'pthread\_t'  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h:567: error: 'pthd4\_mutex\_unlock' was not declared in this scope  
/usr/local/include/c++/4.1.1/hppa2.0w-hp-hpux11.11/bits/gthr-default.h:567: error: request for member 'field2' in 'pthread\_self()', which is of non-class type 'pthread\_t'  
/swtemp/usbs/cc/unix-ce/root/subsys/cb/cdbc/include/cdbc\_0001\_exp.h: At global scope:  
/swtemp/usbs/cc/unix-ce/root/subsys/cb/cdbc/include/cdbc\_0001\_exp.h:41: error: 'unsigned32' has not been declared  
cdbm\_dummy.C: In function 'int main(int, char\*\*)':  
cdbm\_dummy.C:42: error: 'unsigned32' was not declared in this scope  
cdbm\_dummy.C:42: error: expected `;' before 'o\_result'  
cdbm\_dummy.C:46: error: 'o\_result' was not declared in this scope  
cdbm\_dummy.C:64: error: expected `;' before 'testResult'  
cdbm\_dummy.C:158: error: 'testResult' was not declared in this scope  
\*\*\* Error exit code 1

can somebody help me how to move forward for compilation.  
if u need some more information regarding these errors i can provide.

any help appreciated.

with regards,  
mannam

---

<div class="post-metadata">

**Author:** ![ismail.dhaoui](https://community.unix.com/user_avatar/community.unix.com/ismail.dhaoui/32/696_2.png) [@ismail.dhaoui](https://community.unix.com/u/ismail.dhaoui)\
**Post date:** [May 8, 2008, 5:22pm UTC](https://community.unix.com/t/errors-while-compiling-c-module/196132/2 "2008-05-08T17:22:46Z")

</div>

Hi mannam,  
It looks like you are compiling against a wrong library.  
Try to analyse the requirements of your program, you will need also to check includes.  
If you could describe more by giving some peace of code...
