iphone + LDC, a new ARM adventure
Jacob Carlborg
doob at me.com
Wed Feb 5 08:28:07 PST 2014
On 2014-02-05 08:32, Dan Olson wrote:
> Success building phobos this way and was able to writeln() to the Xcode
> console from iPhone 4.
That's great to hear :)
> Again, druntime rt_init() and D functions are called by the iOS app's C main (not using dmain2 main).
>
> In the process, I discovered that std.stdio was uninitialized because
> module constructors are not being called by rt_init(). Something in the
> runtime sections OSX code that does not work for iOS. Oh, well, add to
> the todo list. However, found I could manually initialize std.stdio
> with std_stdio_static_this().
To have to module constructors run you need to implement rt.sections
correctly for iOS. You could most likely use rt.sections_osx for iOS.
> I am not very good with Xcode so any thoughts on how to integrate
> would be nice.
To integrate Xcode with LDC you would need to create a plugin for Xcode,
which is not officially supported. This has already been done by Michel
Fortin[1], but that was for Xcode 3. There are a couple of plugins for
Xcode 4 out there to look at.
[1] http://michelf.ca/projects/d-for-xcode/
--
/Jacob Carlborg
More information about the digitalmars-d-ldc
mailing list