Closed jkhoogland closed 2 years ago
I believe this may be because the jnilibrary.cpp file that is generated has this near the top:
#include <jni.h>
#ifdef __ANDROID__
#include <android/log.h>
#elif defined(__APPLE__) && defined(__OBJC__)
#include <TargetConditionals.h>
#include <Foundation/Foundation.h>
#endif
My guess is that on MacOS, if you brew install llvm and get the non-apple version of clang the __OBJC__
is undefined.
The fix for this has been released with JavaCPP 1.5.8. Thanks for the contribution!
Hi, I use javacpp to build a java wrapper around a c++ library. With the standard apple clang everything builds fine.
When I tried building using clang 15.0 on OSX, it fails out with the following message:
I tried to insert a line in the preset file to define
TARGET_OS_IPHONE
but that did not help.There is some SO answer which suggests to include
but I am not sure where I would put that as this seems something deep inside the javacpp magic.
Did anybody hit this problem and find a fix ?