Strange linker error

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
JaJo_1331951
Level 1
Level 1
First like received

I want to include a simple fixed point math header file. It has no additional includes and you only have to specify if the system has 128bit integer support. However, using certain functions causes the linker to throw the following error:

"undefined reference to '__aeabi_ldivmod'"

We can stop this error if we change any INT64 references in the file to INT32. Of course, if we do this many calculations overflow. I've attached the header file just in case. Is there a known solution to this issue?

0 Likes
5 Replies
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Add these to your library and you should compile just fine:

typedef long long int int64_t;
typedef unsigned long long int uint64_t;

Jacob

0 Likes

Hi Jake,

I actually modified this such that int64_t is now INT64 - I mistakenly attached the original version.

In any case, I'll give this a try and see what happens.

0 Likes
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi jayjohnson

Did the typedefs work for you?

Jacob

0 Likes

Unfortunately we are still seeing the same error.

0 Likes

I just tested on my end and it compiles just fine. Only change made was in the typedefs as you said you had already done.

I'm on SDK 2.2.3.

Only changes made to the file you attached:

pastedImage_0.png

Jacob