[beagleboard] How to add cortex A8-neon's asm function to android?

Hi Eric,

Without any more information than that, It's hard to say. Off hand, I
notice that main.cpp is C++. Do you have the prototype for
yuv422torgb888() declared as extern "C" in main.cpp?

There are a lot of guides online for calling assembly functions from C.
    http://omappedia.org/wiki/Writing_ARM_Assembly

Maybe there's something in that guide that you're missing.

Alan.

Alan Ott <alan@signal11.us> writes:

[...]

After type the command ndk-build, the console get the error message:
"Compile++ arm : v2d <= global.cpp
"Compile++ arm : v2d <= haarDetector.cpp
"Compile++ arm : v2d <= haarTab.cpp
"Compile++ arm : v2d <= initPara.cpp
"Compile++ arm : v2d <= main.cpp
"Compile++ arm : v2d <= resize.cpp
"Compile++ arm : v2d <= track_haar.cpp
"Compile++ arm : v2d <= track_rgb.cpp
"Compile arm : v2d <= yuv422torgb888.s
SharedLibrary : libv2d.so
E:/DSP/2d_lib//obj/local/armeabi/objs/v2d/main.o: In function
`GetOneFrame(unsigned char*, unsigned char*)':
E:/DSP/2d_lib//jni/main.cpp:239: undefined reference to
`yuv422torgb888(unsigned char*, unsigned char*, void*, int)'
collect2: ld returned 1 exit status
make: *** [E:/DSP/2d_lib//obj/local/armeabi/libv2d.so] Error 1

How to fix this problem ?

Hi Eric,

Without any more information than that, It's hard to say. Off hand, I
notice that main.cpp is C++. Do you have the prototype for
yuv422torgb888() declared as extern "C" in main.cpp?

No, he does not. If he did, the linker error message could not show the
full function signature.

Hi Alan Ott ,Måns Rullgård
Thank you for reply!
You are right,After add the extern “C” in the head file, can get the lib correctly.

2012/7/24 Måns Rullgård <mans@mansr.com>