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

折月煮酒 提交于 2020-01-14 04:37:09

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/58476922/call-log-p-in-native-ios-code-codename-one

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!