On Thursday, 8 May 2014 at 08:18:16 UTC, iridium wrote:
On Thursday, 8 May 2014 at 07:55:04 UTC, Jacob Carlborg wrote:
On 08/05/14 08:53, iridium wrote:

That's what happens when linking:
http://itmages.ru/image/view/1655772/669acb30

You need to link with both Phobos and the C standard library. Run "dmd -v main.d" and look at the linking step at the end.

dmd -v test.d result: http://itmages.ru/image/view/1655879/d0bb1c62

gcc -o main test.o ../../phobos/generated/haiku/release/32/libphobos2.a -lstdc++ -lroot result: http://itmages.ru/image/view/1655886/0be9d48f

Try linking to druntime alone first, before you start messing with phobos. You'll notice that the makefile for druntime builds a libdruntime-haiku32.a library, if you modify the makefile for Haiku. Try building some simple executables with that first before moving on to phobos.

You need to go through all the TARGET_FREEBSD blocks in the dmd source and all the version(FreeBSD) blocks in druntime and add TARGET_HAIKU, version(Haiku), and the appropriate source for Haiku inside those blocks. We can't sit here and help you do that, unless it's something truly unusual that you're unable to figure out. Most of these errors seem to be the result of missing some blocks here and there.

Admittedly, porting to a new OS is not a small job, and you seem to be going pretty fast. Keep plugging away at it and I'm sure you'll be able to figure it out.

Reply via email to