I have two working compilers, clang
on a Mac
, which can target iPhone
, and clang
on an iPhone
, which also targets iPhone
. Normally both work great, generating binaries and libraries. Libraries produced on the Mac
can be linked on the iPhone
. But now I face a strange issue: a library is not linking while trying to link on iPhone against a library created on the Mac.
Undefined symbols:
"__Z7JS_Initji", referenced from:
_main in test-CgDtHX.o
This is a call to JS_Init, which is defined as a macro which expands differently.
iphone-clang
will expand it as:
extern JSRuntime * JS_Init(uint32_t maxbytes, int);
mac-clang
will expand as:
extern JSRuntime * JS_Init(uint32_t maxbytes, JSUseHelperThreads useHelperThreads);
I am not sure if the macro expansion is the reason for the linking failure.
Ok, now my question, what exactly ji
and Z7
mean in __Z7JS_Initji
? Where can I find the table that will show me the correspondence between argument types
and those mangling ids
? This must be ld
docs, but I am unable to find it. Mostly because I do not know good query words for this.