64-bit division in SDK 2.X.X

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

cross mob
Anonymous
Not applicable

Hi,

I keep getting this linker error whenever I attempt to divide two 64-bit integers:

undefined reference to `__aeabi_ldivmod'

I tried using INT64 instead, with the same result.

Code:

#ifndef _MY_TEST_H_

#define _MY_TEST_H_

long long my_test_divide(long long dividend, long long divisor)

{

    return dividend / divisor;

}

#endif//_MY_TEST_H_

I found a similar question on the forum, but it was not answered. My WICED Smart SDK version is 2.2.3.

0 Likes
1 Reply
ZhaohuaS_76
Employee
Employee
25 sign-ins 10 questions asked 10 sign-ins

Hi Filipp,

Seems not support the INT64 division in the gcc lib, you need realize it by your self.

BR,

Ocean