Re: Linking on AIX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok having attempted to build both static and shared was the problem. I opted to build only static by configuring with --disable-shared and so I believe it build the static version of the library. Now when I do an 'ar tv' on my static library I get nothing returned. Is this normal?

Unfortunately, when I try to compile using this library I get the following:

g++ -g -O2 -o bin/ac2gi atlas/cpp/src/apps/ac2gi.o lib/.libs/libseqget.a /usr/local/mysql/lib/libmysqlclient.a /flash/home/jling/install/lib/libubic.a -lz
collect2: /flash/home/jling/install/lib/libubic.a: not a COFF file
make: *** [bin/ac2gi] Error 1

What does it take to get that library into COFF format?

Thank You,
John Ling

David Edelsohn wrote:
John Ling writes:


John> I tried "ar tv" on libubic.a and I get what I think is correct:

John> rwxr-xr-x  1409/105   7391044 Aug 16 10:59 2005 libubic.so.0
John> rw-r--r--  1409/105   210082 Aug 02 10:56 2005 Fasta.o
John> rw-r--r--  1409/105   293687 Aug 02 10:56 2005 FastaLoader.o
John> rw-r--r--  1409/105   332056 Aug 02 10:56 2005 Dbrc.o
John> rw-r--r--  1409/105   237825 Aug 02 10:56 2005 MysqlDb.o
John> rw-r--r--  1409/105   309442 Aug 02 10:56 2005 Tax.o
John> rw-r--r--  1409/105    69525 Aug 02 10:56 2005 TaxonIdName.o
John> rw-r--r--  1409/105    93349 Aug 02 10:56 2005 TaxGet.o
John> rw-r--r--  1409/105      648 Aug 02 10:56 2005 Tclap.o
John> rw-r--r--  1409/105   265350 Aug 02 10:56 2005 Stats.o
John> rw-r--r--  1409/105    81579 Aug 02 10:56 2005 StatsDb.o

	This is incorrect.  It looks like the library contains both shared
object and static objects.  You should build one other the other, not
both. John> Yet, libubic.a remains in the hidden directory lib/.libs which I would John> have expected to have been included with the installed library John> libubic.a. This seems odd to me and make me wonder how libubic.a can John> find this .so file. I tried to copy it into the install directory along John> with the installed libubuic.a but without any change to my linking problem.

	Your actions are incorrect.  Do not install the .so file.  The .so
file should be archived, as is occurring.

John> Also in this hidden directory is libubic.exp. A good chunk of this file John> contains names prepended with underscores, such as John> "_Allocate__3stdHc_UlPc_Pc", but there are other names without an John> underscore such as "TaxonId__11TaxonIdNameCFv".
John> Is this the export list that you suggest I modify/create?

	If the export file already is being created, that's fine.  The
problem may be the two different objects in the archive.  You probably
should use --disable-shared or --disable-static when configuring libtool.

David



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux