Why won't this simple LiveCode iOS compiler be created?

I created a simple external using the LiveCode iOS externals SDK. The test.lcid file looks like this:

external test function testMyExternal return boolean 

The file test.mm looks like this:

 bool testMyExternal(void) { return true; } 

The test.ios file is the foundation of the Foundation.

It is about as simple as it gets, but it won’t compile ... why not?

+4
source share
2 answers

This question was asked on the LiveCode mailing list, and I ask and answer here because the answer will be useful to others.

There are several issues here:

Firstly, this is an ios file that defines the frameworks and libraries for compiling an external object, including the Foundation Framework, but the objc-objects clause is not specified in the .lcidl file. If you do not want to use the c object objects, remove the base structure from the .ios file.

The second is the .mm file, which is Objective-C ++, and the C ++ clause is naming not specified. If you do not want C ++, you can change .mm to .c for C or .m for Objective-C.

See section 6.3 documentation for more details.

+3
source

Monte managed to answer his question, but in this case the external .mm file, which means its obj-C ++. This means that you need to add the use of C ++ - naming in the lcidl file; otherwise, the generated glue code will look for C-style (unmangled) names (C ++ β€œmanages” the names of functions that include input information to they could be overloaded)

+2
source

All Articles