From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,5d72cb1805b4c6f,start X-Google-Attributes: gidfee84,public From: boucheau Subject: How to build a shared library on DEC alpha 3.2 Date: 1998/08/06 Message-ID: <35C98BC3.3EDC8F83@BULL.NET>#1/1 X-Deja-AN: 378482359 Content-Transfer-Encoding: 7bit Organization: ism Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 Hi, I try to build a shared library on DEC alpha V3.2 using the following commands: /bin/cc -c -g GccOptimizedFlags -fpic -Dlint -DPOSIX_SOURCE -DOSF -Dalpha -DSYSV -DRE_DECLARE_SIGNALS -Dbsd -taso -migrate -assume noaligned_object -I. -I/vb/source -I/vb/source/include -I/DEC/include -I/usr/local/include -I/usr/include/X11 -IIsm_Extra_Osi_Inc_Dir /vb/source/vb_version.c touch .vb_version~ /bin/cc -shared -Dbsd -taso -migrate -assume noaligned_object -threads \ vb_version.o -L/vb/DEC/lib -L/vb/DEC/shared_lib -warning_unresolved -lm \ -o libvb_version.so When I execute a binary C doing a dlopen of this shared library, I got the error message dlopen: Cannot map library :/vb/DEC/shared_lib/libvb_version.so If I override my libvb_version.so by a system shared library (for example /usr/shlib/libots.so) the dlopen is well performed. my shared lib and the system shared lib has not the same format: $ file libvb_version.so libvb_version.so: COFF format alpha dynamically linked, demand paged executable or object module not stripped - version 3.11-8 $ file libots.so libots.so_s1: COFF format alpha shared library, demand paged executable or object module not stripped - version 3.11-8 So my problem comes from a bad construction of my shared lib, but how build a shared library ? Thanks in advance.