1847251 Members
3176 Online
110263 Solutions
New Discussion

Re: gcc compiler

 
Ridzuan Zakaria
Frequent Advisor

gcc compiler

Hi,

I have a c program that used get getpwnam_r function. I am not able to compile the code successfully using gcc.I am getting the following warning.

rzak.c:93: warning: passing arg 2 of `getpwnam_r' from incompatible pointer type
rzak.c:93: warning: passing arg 5 of `getpwnam_r' from incompatible pointer type

The same code work fine if I compile using ANSI C compiler.

Thanks.
quest for perfections
4 REPLIES 4
Rick Garland
Honored Contributor

Re: gcc compiler

Do you have all the dependencies that gcc relies on?

There are a few additional pieces you need.
Ridzuan Zakaria
Frequent Advisor

Re: gcc compiler

Honestly, I do not know, the installation was done by UNIX Admin. If you have the list of component that need to install please let me know. I can run it with Unix Admin.

Thanks.
quest for perfections
Rick Garland
Honored Contributor

Re: gcc compiler

Some of the dependencies; bison, autoconf, flex, m4, make, perl. There are others.

Check the Software Porting Archive Center for HPUX. http://gatekeep.cs.utah.edu

Search for gcc. This will provide you a list of all the dependencies.
Gregory Fruth
Esteemed Contributor

Re: gcc compiler

Well, what does your call to getpwnam_r look
like? gcc is complaining that the pointer
type of your struct passwd arguments are
incorrect. gcc is much piciker than the
HP cc.