why?

Discussion in 'C++' started by Guest, Nov 8, 2004.

  1. Guest

    Guest Guest

    i wirte a code in aix.
    #include <stdio.h>
    #include <stdlib.h>
    #include <procinfo.h>
    #include <string.h>

    int main ( int argc , char ** argv )
    {
    struct procsinfo pi;
    pid_t retval = (pid_t) 0;

    while(getprocs(&pi, sizeof pi, 0, 0,&retval, 1)>0)
    {
    if ( strstr ( pi.pi_comm , argv[1] ) )
    {
    printf ( "\npi.pi_comm := %s\n" , pi.pi_comm );
    printf ( "pid := %d\n" , pi.pi_pid );
    printf ( "ppid := %d\n" , pi.pi_ppid );
    printf ( "pi_size := %d\n" , pi.pi_size );
    printf ( "pi_nice := %d\n" , pi.pi_nice );
    printf ( "pi_state := %d\n" , pi.pi_state );
    printf ( "pi_flags := %d\n" , pi.pi_flags );
    printf ( "pi_utime := %d\n" , pi.pi_utime );
    printf ( "pi_stime := %d\n" , pi.pi_stime );
    }
    }
    }

    when i compiler it :
    xlC -c pinfo.cpp
    "pinfo.cpp", line 11.15: 1540-0274 (S) The name lookup for "getprocs" did
    not find a declaration.

    why?
    Guest, Nov 8, 2004
    #1
    1. Advertising

  2. wrote:
    > i wirte a code in aix.
    > #include <stdio.h>
    > #include <stdlib.h>
    > #include <procinfo.h>
    > #include <string.h>
    >
    > int main ( int argc , char ** argv )
    > {
    > struct procsinfo pi;
    > pid_t retval = (pid_t) 0;
    >
    > while(getprocs(&pi, sizeof pi, 0, 0,&retval, 1)>0)
    > {
    > if ( strstr ( pi.pi_comm , argv[1] ) )
    > {
    > printf ( "\npi.pi_comm := %s\n" , pi.pi_comm );
    > printf ( "pid := %d\n" , pi.pi_pid );
    > printf ( "ppid := %d\n" , pi.pi_ppid );
    > printf ( "pi_size := %d\n" , pi.pi_size );
    > printf ( "pi_nice := %d\n" , pi.pi_nice );
    > printf ( "pi_state := %d\n" , pi.pi_state );
    > printf ( "pi_flags := %d\n" , pi.pi_flags );
    > printf ( "pi_utime := %d\n" , pi.pi_utime );
    > printf ( "pi_stime := %d\n" , pi.pi_stime );
    > }
    > }
    > }
    >
    > when i compiler it :
    > xlC -c pinfo.cpp
    > "pinfo.cpp", line 11.15: 1540-0274 (S) The name lookup for "getprocs" did
    > not find a declaration.
    >
    > why?


    Most likely it's because there declaration of 'getprocs' is not in any of
    the headers you included.

    Since 'getprocs' is not a standard C++ function, we cannot help you any
    further on the matter. You need to post your question to an AIX
    newsgroup.

    V
    Victor Bazarov, Nov 8, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VGltOjouLg==?=

    Why, why, why???

    =?Utf-8?B?VGltOjouLg==?=, Jan 27, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    553
    Juan T. Llibre
    Jan 27, 2005
  2. Horace Nunley

    why why why does function not work

    Horace Nunley, Sep 27, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    450
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Sep 27, 2006
  3. Mr. SweatyFinger

    VWD why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    371
    =?Utf-8?B?Q2lhcmFuIE8nJycnRG9ubmVsbA==?=
    Dec 21, 2006
  4. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    863
    Mark Rae
    Dec 21, 2006
  5. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,763
    Smokey Grindel
    Dec 2, 2006
Loading...

Share This Page