Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!spool.mu.edu!uunet!panews.awdpa.ibm.com!ibmpa.awdpa.ibm.com!marc From: marc@ibmpa.awdpa.ibm.com (Marc Pawliger) Newsgroups: comp.unix.aix Subject: Re: Can motif programs in C++ be written for RS/6000? Message-ID: <1991Apr1.100448@ibmpa.awdpa.ibm.com> Date: 1 Apr 91 18:04:48 GMT References: <1991Mar31.060749.3749@vax5.cit.cornell.edu> Sender: news@ibmpa.awdpa.ibm.com (news id) Reply-To: marc@ibmpa.awdpa.ibm.com (Marc Pawliger) Distribution: comp Organization: IBM Advanced Workstations Division, Palo Alto Lines: 24 [... talk of executing a program and getting 'cannot load libXXX.a, incorrect format' deleted ...] What has probably happened is that you have linked with a shared library that is not in the 'standard' place i.e. /lib or /usr/lib. When you go to run the program, the loaded can't find the library and bails out. Unfortunately it sometimes reports the wrong library as the one it couldn't find or that was in the 'wrong format'. The solution is to use the -L switch when compiling. This basically adds another directory to the path searched for shared libraries. So if the R4 libraries were in /usr/local/lib, you would add "-L/usr/local/lib -lX11" to use /usr/local/lib/libX11.a instead of /usr/lib/libX11.a. To see if this will work, you could also set LIBPATH to /usr/local/lib:/lib:/usr/lib and try re-running the program. If that works, then recompiling should help. +--Marc Pawliger----IBM Advanced Workstations Division----Palo Alto, CA---+ | Internet: marc@ibminet.awdpa.ibm.com VNET: MARCP at AUSVM6 | | UUCP: uunet!ibminet.awdpa.ibm.com!marc Phone: (415) 855-3493 | +-----IBMinet: marc@ibmpa.awdpa.ibm.com----------IBM T/L: 465-3493------+ These are my opinions, not IBM's etc etc etc