On Apr 20, 4:56 am, sreedhar b <[email protected]> wrote:
> I have a use-case library having *.cpp files. And i made an application with
> *.c extension. I included the above said library as a shared library part of
> the Android.mk for building the application.
>
> I am getting errors showing undefined reference to API's of use-case library
> that i used part of the application.
My first thought would be a name-mangling issue. Are you missing an
'extern "C"' on the prototypes in your header file?
% cat > foo.c
int test(int value) { return 3; }
% gcc -c foo.c
% nm foo.o
00000000 T test
% mv foo.c foo.cpp
% gcc -c foo.cpp
% nm foo.o
00000000 T _Z4testi
U __gxx_personality_v0
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---