Giter VIP home page Giter VIP logo

Comments (13)

danzeeeman avatar danzeeeman commented on June 30, 2024

from apothecary.

danzeeeman avatar danzeeeman commented on June 30, 2024

from apothecary.

 avatar commented on June 30, 2024

Hi Dan,
I was playing around with the include directories and header files. But it's a little nightmare. I know you are the guru.
Thanks for your support,
Hans :-)

from apothecary.

danzeeeman avatar danzeeeman commented on June 30, 2024

yeah the R15 unified headers are causing issues across the board right now. Some libraries are building correctly. Some are not. Some are building and failing to link. Some are not. But yeah R15C is not ready yet.

from apothecary.

 avatar commented on June 30, 2024

Hi Dan,

  1. Could get FreeImage compiling again. But did not test it yet. I think there is a bug in one of the NDK headers. It's Android/Sdk/ndk-bundle/sources/android/support/include/math.h. I put #include_next <math.h> from the beginning of the file to the end of it just before
#include_next <math.h>

#endif // !__LP64__

#endif  /* NDK_ANDROID_SUPPORT_MATH_H */
  1. Yesterday I could compile curl but I am not sure in which configuration as I was playing too much around. My current one is using both android-r15 checkouts for openframeworks and apothecary and it failed. I get an error message saying it cannot find the headers or libs at the specified location. Being brutal I changed the OPENSSL_DIR in the file apothecary/formula/curl/curl.sh.
    elif [ "$TYPE" == "android" ]; then
	local BUILD_TO_DIR=$BUILD_DIR/curl/build/$TYPE/$ABI
        # local OPENSSL_DIR=$BUILD_DIR/openssl/build/$TYPE/$ABI
	local OPENSSL_DIR=$BUILD_DIR/openssl

That solved it at least. Although I am not sure if this is a beautiful solution.

Maybe you could have a look at it as you know the build system and code base much better than me. Sorry I could not test it but it's early morning over here and I am going to sleep now.

BTW, I also tried Android Studio 3.1 with the R16 NDK for the include files looked promising at first. But my estimation is that this will be a complete nightmare to port to.

Cheers,
Hans :-)

from apothecary.

 avatar commented on June 30, 2024

Imported the androidEmptyExample project into Android Studio. Works like a charm!

from apothecary.

danzeeeman avatar danzeeeman commented on June 30, 2024

try loading an ofImage.... you will get a linker error

from apothecary.

 avatar commented on June 30, 2024

Hi Dan, no problem loading an image. Works fine. No linker errors.

I am just having problems getting the addons to work. I am especially interested in ofxSvg. Are addons supposed to work at the moment? Did they work before?

from apothecary.

danzeeeman avatar danzeeeman commented on June 30, 2024

from apothecary.

 avatar commented on June 30, 2024

Hi Dan,
I am having NDK version r15c installed.

I just put the line #include_next <math.h> from the beginning to the end of the file. There are more math.h files included which use the declarations above, like acosl, asinl, etc.

So this file works:
Android/Sdk/ndk-bundle/sources/android/support/include/math.h

/*
 * Copyright (C) 2013 The Android Open Source Project
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */
#ifndef NDK_ANDROID_SUPPORT_MATH_H
#define NDK_ANDROID_SUPPORT_MATH_H

#if !defined(__LP64__)

#ifdef __cplusplus
extern "C" {
#endif

// TODO(digit): Check that this is not needed for Clang.
typedef double      double_t;
typedef float       float_t;

// Missing long double functions. Note that 'long double' is the same
// as 'double' on 32-bit Android, so this will define stubs.
#define LLVM_LIBCXX_LONG_DOUBLE_FUNCTIONS

long double     acosl(long double);
long double     asinl(long double);
long double     atanl(long double);
long double     atan2l(long double x, long double y);
long double     cosl(long double);
long double     coshl(long double);
long double     expl(long double);
long double     fmodl(long double, long double);
long double     powl(long double, long double);
long double     sinl(long double);
long double     sinhl(long double);
long double     sqrtl(long double);
long double     tanl(long double);
long double     tanhl(long double);
long double     acoshl(long double);
long double     asinhl(long double);
long double     atanhl(long double);
long double     cbrtl(long double);
long double     erfl(long double);
long double     erfcl(long double);
long double     expm1l(long double);
long double     hypotl(long double, long double);
long double     lgammal(long double);
long long int   llrintl(long double);
long double     logl(long double);
long double     log1pl(long double);
long double     log2l(long double);
long double     logbl(long double);
long double     log10l(long double);
long double     nanl(const char*);
long double     nearbyintl(long double);
long double     remainderl(long double, long double);
long double     remquol(long double, long double, int*);
long double     rintl(long double);
long int        lrintl(long double);
long double     tgammal(long double);
long double     modfl(long double, long double*);
long double     exp2l(long double);

float           tgammaf(float);
double          nan(const char*);
float           nanf(const char*);

float           log2f(float);
double          log2(double);

#ifdef __cplusplus
}  // extern "C"
#endif

#include_next <math.h>

#endif // !__LP64__

#endif  /* NDK_ANDROID_SUPPORT_MATH_H */

from apothecary.

 avatar commented on June 30, 2024

Hi Dan,

I could get ofxSvg compiling and linking. Was actually pretty easy. Had to play around with the build.gradle file. It's all hardcoded though. If you want I could give you the changes I made. It's only minor. The Groovy scripts should be adapted/extended.

Otherwise I will do a PR in the next few weeks. I have to work first on the SVG implementation on Android. Right now it parses SVG files and I can draw outlines with the standard ofVertex functions but the svg.draw() function does not work. And a lot of crashes too.

Cheers,
Hans-J.

from apothecary.

danzeeeman avatar danzeeeman commented on June 30, 2024

with the last updates to that branch everything builds correctly. It will be merged into master as soon as the CI and travis issues are solved.

from apothecary.

 avatar commented on June 30, 2024

Thanks!

from apothecary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.