From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10ba33,7fecb9b627ed1a8c,start X-Google-Attributes: gid10ba33,public X-Google-Thread: fee84,7fecb9b627ed1a8c,start X-Google-Attributes: gidfee84,public From: kiddg@sealcorp.com.au (Glen Kidd) Subject: Problems creating executables using shared libraries. Date: 1996/09/03 Message-ID: <50gc30$eg2@news.mel.aone.net.au>#1/1 X-Deja-AN: 178112717 organization: Customer of Access One Pty Ltd, Melbourne, Australia newsgroups: gnu.g++.help,comp.unix.osf.osf1 Hiya All I am having trouble with creating /using shared libraries. Everything seems to compile OK, I can produce shared objects, linking these shared objects to another object to produce an executable works. When I run the executable, it loads the symbols OK, but the program always cores. I know the program works, 'cause it works alright statically linked. so something in how I am generating or using the shared objects is flawed. The system I am using is a DEC Alpha running OSF1 V3.2 148. The compiler is gnu g++ v2.7.2 To generate objects to place into the shared object file I am using: g++ -c -shared filename.c I create an 'ar' achive out of all these objects. To generate the shared object: g++ -o libcommon.so -shared -no_archive -all common.a -none libg++.a libstdc++.a To create the executable: g++ -c -shared myprog.c g++ -o myprog myprog.o libcommon.so No step complains, the executable is generated, but on execution a core always results - I am unable to determine why! Any help would be greatly appreciated. ...Ciao for now ...Glen Kidd