Translation of C struct to D
Michael Kremser
mkspamx-usenet at yahoo.de
Tue Nov 15 13:49:21 PST 2011
Jerry thought it would be a good idea to write me on 15.11.2011 05:01
GMT +0100 (CET):
>
> This looks like you don't have druntime or phobos linked into your
> module code.
My Makefile looks as follows:
# D compiler
DC := gdc
# D objects
DOBJS := dinterface.o
ifneq ($(MAKE_KBUILD),)
# kbuild part of makefile
obj-$(CONFIG_HELLO) := hello.o
hello-y += $(DOBJS)
else
# normal part of makefile
KERNELDIR := /lib/modules/$(shell uname -r)/build
all: $(DOBJS)
$(MAKE) -C $(KERNELDIR) M=$(shell pwd) CONFIG_HELLO=m MAKE_KBUILD=1 modules
clean:
$(MAKE) -C $(KERNELDIR) M=$(shell pwd) MAKE_KBUILD=1 clean
%.o: %.d
$(DC) -c $< -o $@
endif
Is there something missing?
> Does the original C example work for you?
Yes, it works, and also the "Hello World" module in D from the other
webpage works.
More information about the Digitalmars-d
mailing list