[osg-users] Android osgPlugins

Jan Ciger jan.ciger at gmail.com
Mon May 25 10:26:08 PDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/25/2015 07:00 PM, Christian Kehl wrote:
> Hi Jan,
> 
> I join your thinking. The compilation is done using the cmake line 
> from Rafa (see post  Sat May 02, 2015 7:48 am), and because it 
> compiles OSG as static, I somehow doubt the compilation is wrong. 
> That said, you may be right that the library is registered 
> incorrectly. Thing is: I have multiple installs of OSG, as many of
> us do. One is the osg from the package manager, the other one is
> the android 3.3.8 OSG one, and then some more local ones. The funny
> point is that the Android.mk specifies all paths as absolute paths,
> so when one calls the ndk-build, it obviously takes the right
> libraries, as it always should. But when I run the osgSimple, I do
> this from Eclipse, which usually links the resources to the
> /usr/lib libraries.

How did you determine that Eclipse "usually links the resources to
/usr/lib libraries"?

Those are likely for your desktop machine, unless you have installed
the Android version of OSG there. If you are using the Eclipse Android
development plugin, it will not touch those - different architecture
and all. It wouldn't even link if you were mixing architectures.

> Because there are no compilation complains and because the
> osgAndroid project is statically referred to by osgSimple, it
> obviously takes that jar-file from its absolute destination.

Uhm, how did you figure this out? I am quite not following, to be
honest. If your plugins are missing and they are compiled as dynamic,
for whatever reason, you *will not* get a compilation/linking error!

> Question is: How do I tell the Android eclipse builder to link all
> inter-dep ending library files (osgPlugins-3.3.8) from a specific
> location and NOT to get them from the global /usr/lib location ? I
> am lacking the in-depth knowledge on how to configure the apk
> builder within Eclipse to change its behaviour. Any hint would be
> very much appreciated ...

You need to modify the Android.mk file in your jni directory normally.
That's where you specify where the dependencies are and what to link.
Eclipse doesn't do any magic there - it just calls ndk-build and that
one in turn calls make.

However, I do feel that you have quite a mess on your workstation - I
would strongly suggest to remove all the various versions of OSG (e.g.
move them out of the way, rename them, etc.) to make sure you have
only the Android one present. And then try to build the thing.

Best regards,

J.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iD8DBQFVY1swn11XseNj94gRAghbAKCCp3SJhmU4ZjC5xLf17fS4KeJlXwCgwdlG
q69dCxNswf1mraBK5meZ6H0=
=dXi1
-----END PGP SIGNATURE-----



More information about the osg-users mailing list