[Ves] Configuring VES for Eclipse and ndk-build

Sven Prevrhal sprevrha at gmail.com
Wed Aug 28 05:03:05 EDT 2013


When I added the KiwiNative.cpp and java files to my project and attempted
to build it, the 'dynamic_cast' in the vtk SharedPtr caused errors.

D:/packages/Android/android-ndk-r8c/sources/cxx-stl/gnu-libstdc++/4.6/include/tr1/shared_ptr.h:625:31:
error: 'dynamic_cast' not permitted with -fno-rtti

Reading up on android-ndk-r8c/docs/CPLUSPLUS-SUPPORT.html showed that adding

LOCAL_CPP_FEATURES += rtti

to my own module section in the Android.mk file would fix that - and it
did. I can now compile my app.

To actually make it run, I had to fix the bugs in Eigen's Visitor.h file
that Eclipse had flagged. Before fixing them, Eclipse would say "Your
project contains error(s), please fix them before running your application"
and cancel the launch.

One of the bugs is at Visitor.h line 37, around

  static inline void run(const Derived &mat, Visitor& visitor)
  {
    return visitor.init(mat.coeff(0, 0), 0, 0);
  }

is obviously a true bug, so removing "return" did the job here. At lines
194 and  228, the macro EIGEN_STATIC_ASSERT_VECTOR_ONLY has a definition
that uses the undefined
macro YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX, so i just commented
that out.

Now it launches.



On Tue, Aug 27, 2013 at 4:19 PM, Candemir Doger <cd.doger at gmail.com> wrote:

> Hi Sven,
>
> That's correct my intention was to decouple the cmake process from app
> development. The cmake is only used for building the .a libraries at first.
> I will try to clean and share the whole project when I have the time.
>
>
> On Tue, Aug 27, 2013 at 3:24 PM, Sven Prevrhal <sprevrha at gmail.com> wrote:
>
>> I am on Windows and used cmake to build the VES and KIWI Libs and App.
>> Then I followed Candemir's Blog at
>> http://www.kitware.com/blog/home/post/538 for the Android.mk and the
>> Application.mk file. Then I just used the ndk-build.cmd (via the Eclipse
>> "Build project" context menu), so no cmake here. The way I had interpreted
>> the blog and the whole cmake business was that it was needed to compile the
>> ves libs etc but  not the Android app, and the whole point of the blog was
>> to discouple further app development from cmake and use the standard NDK
>> build chain instead. Is that wrong? The generator looks interesting but I
>> am not sure how exactly I need to use it for VES/Kiwi. Anywhere I can read
>> up on it?
>>
>>
>> On Tue, Aug 27, 2013 at 3:07 PM, Aashish Chaudhary <
>> aashish.chaudhary at kitware.com> wrote:
>>
>>> Thanks for  notifying us. I am assuming you used cmake eclipse
>>> generator?
>>>
>>> Thanks,
>>>
>>>
>>>
>>> On Tue, Aug 27, 2013 at 8:41 AM, Sven Prevrhal <sprevrha at gmail.com>wrote:
>>>
>>>> When I actually tried #include'ing the vesKiwiViewerApp.h in my own cpp
>>>> file, build showed the error below. I fixed it by adding
>>>> $(LOCAL_PATH)/eigen to the LOCAL_C_INCLUDES.
>>>>
>>>> D:\packages\Android\android-ndk-r9\ndk-build.cmd all
>>>> "Compile++ thumb : MyFirstAndroidNativeAppFromScratch <=
>>>> MyFirstAndroidNativeAppFromScratch.cpp
>>>> In file included from jni/ves-android/include/ves/ves/vesMath.h:24:0,
>>>>                  from
>>>> jni/ves-android/include/ves/kiwi/vesKiwiBaseApp.h:30,
>>>>                  from
>>>> jni/ves-android/include/ves/kiwi/vesKiwiViewerApp.h:25,
>>>>                  from jni/MyFirstAndroidNativeAppFromScratch.cpp:5:
>>>> jni/ves-android/include/ves/ves/vesEigen.h:30:23: fatal error:
>>>> Eigen/Dense: No such file or directory
>>>> compilation terminated.
>>>> make: ***
>>>> [obj/local/armeabi/objs/MyFirstAndroidNativeAppFromScratch/MyFirstAndroidNativeAppFromScratch.o]
>>>> Error 1
>>>>
>>>>
>>>> _______________________________________________
>>>> Ves mailing list
>>>> Ves at public.kitware.com
>>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>>>>
>>>>
>>>
>>>
>>> --
>>> | Aashish Chaudhary
>>> | R&D Engineer
>>> | Kitware Inc.
>>> | www.kitware.com
>>>
>>
>>
>>
>> --
>> --
>> Sven
>>
>> _______________________________________________
>> Ves mailing list
>> Ves at public.kitware.com
>> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>>
>>
>


-- 
--
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130828/5a9cd956/attachment-0001.html>


More information about the Ves mailing list