<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} .ms-cui-menu {background-color:#ffffff;border:1px rgb(171, 171, 171) solid;font-family:"Segoe UI WPC","Segoe UI",Tahoma,"Microsoft Sans Serif",Verdana,sans-serif;font-size:10pt;color:rgb(51, 51, 51);} .ms-cui-menusection-title {display:none;} .ms-cui-ctl {vertical-align:text-top;text-decoration:none;color:rgb(51, 51, 51);} .ms-cui-ctl-on {background-color:rgb(223, 237, 250);opacity: 0.8;} .ms-cui-img-cont-float {display:inline-block;margin-top:2px} .ms-cui-smenu-inner {padding-top:0px;} .ms-owa-paste-option-icon {margin: 2px 4px 0px 4px;vertical-align:sub;padding-bottom: 2px;display:inline-block;} .ms-rtePasteFlyout-option:hover {background-color:rgb(223, 237, 250) !important;opacity:1 !important;} .ms-rtePasteFlyout-option {padding:8px 4px 8px 4px;outline:none;} .ms-cui-menusection {float:left; width:85px;height:24px;overflow:hidden}
<!--
p
{margin-top:0;
margin-bottom:0}
.ms-cui-menu
{background-color:#ffffff;
border:1px rgb(171,171,171) solid;
font-family:"Segoe UI WPC","Segoe UI",Tahoma,"Microsoft Sans Serif",Verdana,sans-serif;
font-size:10pt;
color:rgb(51,51,51)}
.ms-cui-ctl
{vertical-align:text-top;
text-decoration:none;
color:rgb(51,51,51)}
.ms-cui-ctl-on
{background-color:rgb(223,237,250)}
.ms-cui-img-cont-float
{display:inline-block;
margin-top:2px}
.ms-cui-smenu-inner
{padding-top:0px}
.ms-owa-paste-option-icon
{margin:2px 4px 0px 4px;
vertical-align:sub;
padding-bottom:2px;
display:inline-block}
.ms-rtePasteFlyout-option
{padding:8px 4px 8px 4px;
outline:none}
.ms-cui-menusection
{float:left;
width:85px;
height:24px;
overflow:hidden}
@font-face
{font-family:"Malgun Gothic"}
@font-face
{font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline}
span.EmailStyle17
{font-family:"Calibri","sans-serif";
color:windowtext}
.MsoChpDefault
{font-family:"Calibri","sans-serif"}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
-->
--></style>
</head>
<body>
<div style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><br>
</p>
<p>FYI:</p>
<p><br>
</p>
<p>We got past another one of the hurdles we were facing here.<br>
</p>
<p><br>
</p>
<p>One of my colleagues found out how to build an Android app (MyApp.apk)</p>
<p>with dependency on VTK 7.0 libraries.</p>
<p><br>
</p>
<p>It turns out that the order of VTK libraries matters and is the opposite of the way</p>
<p>we had initially assumed, with common libraries listed last instead of first.</p>
<p><br>
</p>
<p>So we now have something like this in our build.gradle file:<br>
</p>
<p><br>
</p>
<p>...</p>
<p><br>
</p>
<p> ndk {<br>
moduleName "myLibraryName"<br>
cppFlags.add("-std=c++11")<br>
cppFlags.add("-fexceptions")<br>
cppFlags.add("-frtti")<br>
cppFlags.add("-I${OTHER_INCLUDE_DIR}".toString())<br>
cppFlags.add("-I${VTK_INCLUDE_DIR}".toString())</p>
<p> ldLibs.addAll(["dl", "log", "z", "android", "EGL", "GLESv2"])<br>
stl "gnustl_shared"<br>
}<br>
</p>
<p><br>
</p>
<p> productFlavors {<br>
create("arm64-v8a") {<br>
ndk {<br>
abiFilters.add("arm64-v8a")<br>
ldFlags.add("-L${OTHER_LIB_DIR}".toString())<br>
ldLibs.add("other")<br>
ldFlags.add("-L${VTK_LIB_DIR}".toString())<br>
ldLibs.add("vtkRenderingOpenGL2-7.0")<br>
ldLibs.add("vtkglew-7.0")<br>
ldLibs.add("vtkImagingHybrid-7.0")<br>
ldLibs.add("vtkRenderingFreeType-7.0")<br>
ldLibs.add("vtkfreetype-7.0")<br>
ldLibs.add("vtkIOGeometry-7.0")<br>
ldLibs.add("vtkIOCore-7.0")<br>
ldLibs.add("vtkIOImage-7.0")<br>
ldLibs.add("vtkzlib-7.0")<br>
ldLibs.add("vtkDICOMParser-7.0")<br>
ldLibs.add("vtkmetaio-7.0")<br>
ldLibs.add("vtktiff-7.0")<br>
ldLibs.add("vtkpng-7.0")<br>
ldLibs.add("vtkjpeg-7.0")<br>
ldLibs.add("vtkCommonComputationalGeometry-7.0")<br>
ldLibs.add("vtkRenderingCore-7.0")<br>
ldLibs.add("vtkFiltersCore-7.0")<br>
ldLibs.add("vtkFiltersGeneral-7.0")<br>
ldLibs.add("vtkFiltersExtraction-7.0")<br>
ldLibs.add("vtkFiltersStatistics-7.0")<br>
ldLibs.add("vtkalglib-7.0")<br>
ldLibs.add("vtkImagingFourier-7.0")</p>
<p> ldLibs.add("vtkImagingCore-7.0")<br>
ldLibs.add("vtkFiltersSources-7.0")<br>
ldLibs.add("vtkFiltersGeometry-7.0")<br>
ldLibs.add("vtkCommonColor-7.0")<br>
ldLibs.add("vtkCommonTransforms-7.0")<br>
ldLibs.add("vtkCommonSystem-7.0")<br>
ldLibs.add("vtkCommonMath-7.0")<br>
ldLibs.add("vtkCommonExecutionModel-7.0")<br>
ldLibs.add("vtkCommonDataModel-7.0")<br>
ldLibs.add("vtkCommonMisc-7.0")<br>
ldLibs.add("vtkCommonCore-7.0")<br>
ldLibs.add("vtksys-7.0")<br>
}<br>
}<br>
<br>
...</p>
<p><br>
</p>
<p><br>
</p>
</div>
</body>
</html>