iOS Build Environment Help Center

failed to compile hello world sample!

append delete HiWill

• Windows 10
• v3.38,
•SDK 15

compile hello world sample from command line;
with remote log option , rdc.m from toolchain failed to compile;
error msg :
rdc.m(163,91): error: implicit declaration of function '__cxa_demangle' is invalid in C99

if disable remote log option and recompile from command line;
get some link error;
Undefined symbols for architecture arm64:

Reply RSS

Replies

append delete #1. Pierre-Marie Baty

Hello

Indeed the samples haven't been updated in a very long time, and some of them no longer build with the current iOS SDK.

Here's how to patch the HelloWorld one so that it builds.

Open make.cmd and on line 80 change:

% build.cmd
set IOS_LDFLAGS
%

to

% build.cmd
set IOS_LDFLAGS=-framework CoreFoundation -framework Foundation -framework UIKit
%

You'll also need to patch the Toolchain\extra\rdc.m file in the builder's install path. Add the following lines after the #include list:

% rdc.m
// forward declaration of the __cxa_demangle() libcxxabi facility
char *__cxa_demangle (const char *mangled_name, char *output_buffer, size_t *length, int *status);	
%

Save and rebuild. This should fix the problem.

I'm going to review the supplied examples and make sure they all build. I haven't done this in a long time, I guess it's time.

append delete #2. HiWill

Thanks! it's helpful !

append delete #3. Pierre-Marie Baty

All examples now compile with the new version I just uploaded.

Some of them use outdated technologies and deprecated APIs, these ones might not run on the latest iOS as good as on the version of iOS for which they were written.

I’ll consider this issue solved, but feel free to notify me of any problem I may have overlooked.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty