I'm trying to use libTheoraPlayer on an Android project. I've already managed to build the latest build form trunk as a static library, but when I try to use libTheoraPlayer I get unhelpful compiler errors.
First, I get a bunch of compile with -fPIC. This happens if I build my NDK library OR build libTheoraPlayer as a dynamic library.
I also get a bunch of Undefined References errors. libogg.a is definitely in my project and in the include folder, so I'm not too sure what might be causing it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We've set up visual studio 2012 project for android compilation. use vs_android for it. if you set up you makefiles manually make sure you copy the preprocessor directives from visual studio android targets.
Other then that I have no idea why you get arm issues? Maybe you're using a different libstdc++?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I haven't had a chance to test yet building directly yet, but my colleague tried to build v1.0.0 (tag 189) and it's broken by default. Code references config_types.h in the libogg project but the file just isn't there. Trying to include the header from a more recent build makes it throw a bunch of undefined references.
Last edit: MorphingDragon 2014-07-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, I got closer to the issue. Not quite sure how to fix it quite yet.
Theora Player uses exceptions, but since we need to use this as a dynamic library the exceptions library (libsupc++) wont be able to link as its not compiled with position independent code.
Last edit: MorphingDragon 2014-07-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to use libTheoraPlayer on an Android project. I've already managed to build the latest build form trunk as a static library, but when I try to use libTheoraPlayer I get unhelpful compiler errors.
First, I get a bunch of compile with -fPIC. This happens if I build my NDK library OR build libTheoraPlayer as a dynamic library.
For Example -
Error 1 error : C:/NVPACK/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libsupc++.a(eh_globals.o): requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC c:\nvpack\android-ndk-r10\toolchains\arm-linux-androideabi-4.8\prebuilt\windows\arm-linux-androideabi\bin\ld.exe 1 1 StreamingVideoPlugin
I also get a bunch of Undefined References errors. libogg.a is definitely in my project and in the include folder, so I'm not too sure what might be causing it.
We've set up visual studio 2012 project for android compilation. use vs_android for it. if you set up you makefiles manually make sure you copy the preprocessor directives from visual studio android targets.
Other then that I have no idea why you get arm issues? Maybe you're using a different libstdc++?
No I've been using vs-android
do you use vs-android for your project as well? visual studio 2012, right?
hmm, very weird, I use 4.8 and armv7a as well
Is libTP compatible with STLPort?
haven't tried it, possibly that's the cause of your problem, we use libstdc++ from android ndk diretctly.
why are you using stlport if I may ask?
Just because I noticed it didn't chuck up errors when trying to build the dynamic library.
I'll try using libstdc++ directly from the ndk tomorrow
Just because I noticed it didn't chuck up errors when trying to build the dynamic library.
I'll try using libstdc++ directly from the ndk tomorrow
Ok, let me know how it goes please. If you're compiling everything with vs-android you really shouldn't have any problems.
I haven't had a chance to test yet building directly yet, but my colleague tried to build v1.0.0 (tag 189) and it's broken by default. Code references config_types.h in the libogg project but the file just isn't there. Trying to include the header from a more recent build makes it throw a bunch of undefined references.
Last edit: MorphingDragon 2014-07-18
OK, I got closer to the issue. Not quite sure how to fix it quite yet.
Theora Player uses exceptions, but since we need to use this as a dynamic library the exceptions library (libsupc++) wont be able to link as its not compiled with position independent code.
Last edit: MorphingDragon 2014-07-18
Building libTheoraPlayer with STLPort seems to make it build successfully.
don't use the tag, use the trunk revision, it's stable and works good.
and yeah, the lib uses exceptions. RTTI is also recommended.
try trunk version and let's see how it works there.