Re: [dev] Problems with dynamic loading on AIX

From: Deiters (ukd@xenon.pc.Uni-Koeln.DE)
Date: Wed May 02 2001 - 12:38:56 PDT

  • Next message: Henning Meier-Geinitz: "Re: [dev] SANE documentation and latex problems"

    On a HP workstation under HP-UX you build dynamic libraries by
    compiling with "relocatable flag" +z

            cc -Aa -c +z +O2 subroutine.c -I where_I_hide_my_includes

    and then you invoke the link editor to create the library:

            ld -b -o mylib.sl subroutine1.o subroutine2.o -dld ...

    Finally, you produce the executable:

            ld -o myprog [-E] main.o mylib.sl ...

    The "-E" forces all symbols in main() to be visible to the shared
    libraries. Without this, only those symbols are exported that
    are required by the shared libs at link time. If you dynamically
    load a library that needs more, you are in trouble; hence the "-E"
    option.

    Of course, this applies to the HP C/C++ compiler. AIX may be different.

    Regards,

    Ulrich

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Wed May 02 2001 - 12:40:48 PDT