Operating System - Linux
1828161 Members
2480 Online
109975 Solutions
New Discussion

calling allow_unaligned_data_access() problem

 
c_ogen
New Member

calling allow_unaligned_data_access() problem

experts:
I want to build helloworld on ia64 hp server rx1620(b.11.23 ia64).
compiler is aCC:
aCC: HP aC++/ANSI C B3910B A.06.10 [Mar 22 2006]
code is:
//helloworld.cpp
#include
using namespace std;
extern "C" void allow_unaligned_data_access();
int main()
{
string str = "testing";
allow_unaligned_data_access();
cout<
return 0;
}
compile:
aCC -o t helloworld.cpp -L/usr/lib -lhppa
I have got message:Mismatched ABI (not an ELF file) for -lhppa
libhppa.sl is a system lib,and the file type of libhppa.sl is:
file /usr/lib/libhppa.sl
output:s800 shared library -not stripped
question: why i can't link with libhppa.sl?
1 REPLY 1
Dennis Handly
Acclaimed Contributor

Re: calling allow_unaligned_data_access() problem

You need to read the documentation:
http://docs.hp.com/en/10946/pragmas.htm#pragma-pack-ex4

>-L/usr/lib -lhppa

Why would you expect a PA-RISC path and lib name to work for IPF?
You need to use -lunalign.