Compiling DMD for the iPhone simulator
Jacob Carlborg
doob at me.com
Wed Apr 25 23:56:02 PDT 2012
On 2012-04-26 01:51, Michel Fortin wrote:
> On 2012-04-25 20:00:42 +0000, Jacob Carlborg <doob at me.com> said:
>
>> I'm trying to compile DMD for the iPhone simulator. I've modified the
>> makefile to point to the files (SDK, g++ and so on) in
>> <path>/iPhoneSimulator.platform. DMD compiles successfully but when I
>> run DMD without any flags it prints:
>>
>> "read error, errno = 2"
>>
>> And then the regular usage information. When I try to compile a file
>> it says:
>>
>> read error, errno = 2
>> read error, errno = 2
>> Error: cannot read file main.d
It turned out to be a problem with DMD. It had declared a type as
"unsigned int" instead of "size_t". stat.st_size appears to be 64bit in
the iPhone simulator SDK.
Then I got a new problem. When I compile druntime it complains about
conflicting module names. Somehow it seems the package name disappears.
> Are you running it straight from the command line? I suspect libraries
> in the simulator SDK need the simulator's environment to work, which is
> a pile of undocumented things.
Yes, just as you can, I assume, with the compilers already present in
<path>/iPhoneSimulator.platform.
> I'm also quite curious about what you're trying to achieve.
I was planning to try and run a D program in the iPhone simulator. As a
first step, I thought it would be much easier then running it on the
real device. The simulator runs 32bit code and not ARM.
If we eventual can run D program on iOS devices I'm pretty sure we also
want to run them on the simulator.
Can't hurt to try and see what it takes :)
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list