Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

archive library build on 64bit architecture

Status
Not open for further replies.

echorak

Programmer
Apr 15, 2005
5
US
I'm trying to build an archive library using the following script. It builds fine on 32-bit architectures, but when I try to build on a computer with 64-bit architecture I get this error message: /usr/bin/ld: warning: i386 architecture of input file `../lpdlib/lpdlib_byteswapio.a(system.o)' is incompatible with i386:x86-64 output

I'm extremely unfamiliar with library building commands and can't figure out how to specify the architecture of the input object files. Any clues?


Makefile:

FORT_COMP= pgf90
FORT_OPTS= -c -Mvect -Minfo -Munroll -Mnoframe -O2 -pc 64 -Mnofree -Mbyteswapio
ARCHIVE=ar rs
RANLIB =ls

LIB=lpdlib_byteswapio.a

SOURCE = cpart.f names.f polar.f random.f surfer.f system.f vform.f interpol.f polarst.f

$(LIB): $(SOURCE)
$(FORT_COMP) $(FORT_OPTS) $(?)
$(ARCHIVE) $(LIB) $(?:.f=.o)
$(RANLIB) $(LIB)
rm -f $(?:.f=.o)

 
Looks like you need a 64bit version of lpdlib_byteswapio.a
 
well, I know that much. But since I'm building this library myself, using the "ar" unix command, my question was how to specify to "ar" that this a 64-bit architecture.
 
This is just a guess: use the compiler to do the linking. I have a similar problem in C++. If I use the compiler to do the linking, it works. If I use ar or ld, it falls over in a heap.

If you're using the compiler, you can just specify -byteswapio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top