Francesco Galgani
Francesco Galgani

Reputation: 6249

Call Log.p(...) in native iOS code (Codename One)

This question is relevant only for Codename One native interfaces.

In Codename One, native code, iOS, I'm trying to do:

com_codename1_io_Log_p___java_lang_String(CN1_THREAD_GET_STATE_PASS_ARG fromNSString(CN1_THREAD_GET_STATE_PASS_ARG [goCoderLicensingError localizedDescription]));

but I get:

Implicit declaration of function 'com_codename1_io_Log_p___java_lang_String' is invalid in C99

What's wrong? Thank you

Upvotes: 1

Views: 29

Answers (1)

Shai Almog
Shai Almog

Reputation: 52760

You need to include the header at the top. Specifically:

#include "com_codename1_io_Log.h"

C implicitly declares a function it didn't "see" before.

Upvotes: 1

Related Questions