Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - use external library in QNX Momentics IDE4.7.0: (3 Items)
   
use external library in QNX Momentics IDE4.7.0  
Hi, guys,

I created a QNX c project and add a external library built using RVDS into the project. But when I built the project, a 
"undefined reference to '__aeabi_memcpy'"
error occured.
Could anybody help me to fix the problem?

The building info is attached.
Attachment: Text build_info.txt 14.75 KB
Re: use external library in QNX Momentics IDE4.7.0  
On 10-12-20 03:56 AM, Jerry Van wrote:
> Hi, guys,
>
> I created a QNX c project and add a external library built using RVDS
> into the project. But when I built the project, a "undefined reference
> to '__aeabi_memcpy'"
> error occured.
> Could anybody help me to fix the problem?

You'll have to add a wrapper function like the following to your code;

void __aeabi_memcpy (void *dest, const void *src, size_t n) {
    memcpy (dest, src, n);
}

Note: your library will only be ABI compatible with the 'armle-v7' 
variant and you cannot use it with the 'armle' variant.

Regards,

Ryan Mansfield
RE: use external library in QNX Momentics IDE4.7.0  
Hi, Ryan

Your advice very worked. Thank u.
By the way, I dumped 'libc.a', but I could not find __aeabi_memcpy. So there is no library consisted __aeabi_memcpy in 
qnx's tool chain, right?   

BR.
Jerry. 

-----Original Message-----
From: Ryan Mansfield [mailto:community-noreply@qnx.com] 
Sent: 2010年12月20日 21:16
To: general-community
Subject: Re: use external library in QNX Momentics IDE4.7.0

On 10-12-20 03:56 AM, Jerry Van wrote:
> Hi, guys,
>
> I created a QNX c project and add a external library built using RVDS 
> into the project. But when I built the project, a "undefined reference 
> to '__aeabi_memcpy'"
> error occured.
> Could anybody help me to fix the problem?

You'll have to add a wrapper function like the following to your code;

void __aeabi_memcpy (void *dest, const void *src, size_t n) {
    memcpy (dest, src, n);
}

Note: your library will only be ABI compatible with the 'armle-v7' 
variant and you cannot use it with the 'armle' variant.

Regards,

Ryan Mansfield



_______________________________________________

General
http://community.qnx.com/sf/go/post79350