undefined reference to `__aeabi_f2uiz'

1,438 views
Skip to first unread message

ganhpt

unread,
Aug 13, 2010, 2:12:26 AM8/13/10
to android-ndk
Hi All,

I have some native c source code and I wanted to convert it into a
library for Android Application.

I compiled the source code using NDK toolchain(arm-eabi-4.2.1). and I
created the archive (libExample.a).

Now, I want to create a shared library by linking to the above
created archive.
In Android.mk , I am assigning path to archive

TARGET_LDLIBS := -Wl, <path-to-archive>/libExample.a

But, NDK is throwing the below error :

undefined reference to `__aeabi_f2uiz'

This error message refers to the below statement in the source

NoFragUnits = ((float)(TotalSize)/unitSize) + 1;

where,
NoFragUnits => int
TotalSize => int
unitSize => short


Could anyone help me to resolve this....


Thanks & Regards
Ganesh


ganhpt

unread,
Aug 13, 2010, 2:19:47 AM8/13/10
to android-ndk

mic _

unread,
Aug 13, 2010, 3:49:56 AM8/13/10
to andro...@googlegroups.com
I'm not sure I see the need for using a floating point division in the example you posted. It's not scaling the quota before converting it back to int, so any fractional digits will be lost all the same. (consider   3/5 == 0  vs  3.0/5.0 == 0.6, (int)0.6 == 0).

/Michael



--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


alan

unread,
Aug 13, 2010, 5:44:36 AM8/13/10
to android-ndk
You should either be using:
LOCAL_LDFLAGS := <path-to-archive>/libExample.a
or
LOCAL_LDFLAGS := '-L$<path-to-archive>/' '-lexample'


On Aug 13, 8:49 am, mic _ <micol...@gmail.com> wrote:
> I'm not sure I see the need for using a floating point division in the
> example you posted. It's not scaling the quota before converting it back to
> int, so any fractional digits will be lost all the same. (consider   3/5 ==
> 0  vs  3.0/5.0 == 0.6, (int)0.6 == 0).
>
> /Michael
>
> > android-ndk...@googlegroups.com<android-ndk%2Bunsu...@googlegroups.com>
> > .

Sambhav

unread,
Aug 14, 2010, 12:32:30 AM8/14/10
to andro...@googlegroups.com
I was facing the same problem "undefined reference to `__aeabi_f2uiz'"
I use custom makefiles. Including libgcc.a solved this problem.
 
you can check presence of the function in the library
#arm-eabi-nm $(NDK_HOME)/build/prebuilt/linux-x86/arm-eabi-4.x.x/lib/gcc/arm-eabi/4.x.x/interwork/libgcc.a | grep __aeabi_f2uiz

To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages