AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only

Problems running c compiler

  • 1.  Problems running c compiler

    Posted Fri September 04, 2009 06:23 AM

    Originally posted by: SystemAdmin


    Wondering if anyone can help me. Have recently upgraded AIX to v5.3tl09, but we are now having problems with the c compiler. Upgraded this to v9 but also have v6 running on some machine, all give the same results.

    Trying to compile the following test program:

    #include <stdio.h>
    #include <math.h>

    int main(char **args)

    {
    double f = floor(20/6);
    printf("Hello world, 20/6 ~= %2.1f\n",f);
    }

    However when I run the following command I get these results:

    1. cc -bnoquiet adv_hello_world.c -o adv_hello_world
    (ld): halt 4
    (ld): setfflag 4
    (ld): savename adv_hello_world
    (ld): filelist 5 1
    (ld): i /lib/crt0.o
    (ld): i adv_hello_world.o
    (ld): lib /usr/vac/lib/libxlopt.a
    (ld): lib /usr/vac/lib/libxl.a
    (ld): lib /usr/lib/libc.a
    LIBRARY: Shared object libc.ahttp://shr.o: 2874 symbols imported.
    LIBRARY: Shared object libc.ahttp://meth.o: 2 symbols imported.
    LIBRARY: Shared object libc.ahttp://posix_aio.o: 20 symbols imported.
    LIBRARY: Shared object libc.ahttp://aio.o: 18 symbols imported.
    LIBRARY: Shared object libc.ahttp://pse.o: 5 symbols imported.
    LIBRARY: Shared object libc.ahttp://dl.o: 4 symbols imported.
    LIBRARY: Shared object libc.ahttp://pty.o: 1 symbols imported.
    FILELIST: Number of previously inserted files processed: 5
    (ld): resolve
    RESOLVE: 38 of 6027 symbols were kept.
    (ld): addgl /usr/lib/glink.o
    ADDGL: Glink code added for 4 symbols.
    (ld): er full
    ld: 0711-318 ERROR: Undefined symbols were found.
    The following symbols are in error:
    Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
    RLD: Address Section Rld-type Referencing Symbol

    .floor 28 ER PR adv_hello_world.c(adv_hello_world.o)
    00000024 .text R_RBR 12 .main
    ER: The return code is 8.
    I'm hoping that someone can shed some light on it for me.

    Cheers
    Russell
    #AIX-Forum