Embedded Systems (STM32) LDC Absolute minimal runtime
Dan Walmsley via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 19 03:24:29 PDT 2017
Hi guys,
I run an open source project developing a modern cross
platform IDE for embedded systems,
https://github.com/VitalElement/avalonStudio (perhaps the IDE
could complement D as I have not found many just works out the
box solutions for D yet.)
I have begun to integrate the LDC compiler and would also like
to attempt to use D in an upcoming embedded project I have.
I have played around with the betterC flag and it looks
promising. I would also like to have use of classes, however as
soon as I try to use a class I get many link errors. see below:
The undefined reference to `_d_dso_registry' comes from removing
the -betterC flag.
I understand these other symbols would be provided by object.d,
however I am unable to find an object.d that will compile on LDC,
and ideally a minimal implementation.
Can anyone help?
C:\dev\repos\STM32DBlinky\Blinky\build\obj\main.o: In function
`_D4main9TestClass3SumMFZi':
C:\dev\repos\STM32DBlinky\Blinky/main.d:9: undefined reference to
`_D9invariant12_d_invariantFC6ObjectZv'
C:\dev\repos\STM32DBlinky\Blinky/main.d:9: undefined reference to
`_d_assert_msg'
C:\dev\repos\STM32DBlinky\Blinky\build\obj\main.o: In function
`ldc.register_dso':
C:\dev\repos\STM32DBlinky\Blinky\main.d:(.text.ldc.register_dso+0x60): undefined reference to `_d_dso_registry'
C:\dev\repos\STM32DBlinky\Blinky\build\obj\main.o:(.data.rel.ro._D4main9TestClass6__vtblZ[_D4main9TestClass6__vtblZ]+0x4): undefined reference to `_D6object6Object8toStringMFZAya'
C:\dev\repos\STM32DBlinky\Blinky\build\obj\main.o:(.data.rel.ro._D4main9TestClass6__vtblZ[_D4main9TestClass6__vtblZ]+0x8): undefined reference to `_D6object6Object6toHashMFNbNeZk'
C:\dev\repos\STM32DBlinky\Blinky\build\obj\main.o:(.data.rel.ro._D4main9TestClass6__vtblZ[_D4main9TestClass6__vtblZ]+0xc): undefined reference to `_D6object6Object5opCmpMFC6ObjectZi'
C:\dev\repos\STM32DBlinky\Blinky\build\obj\main.o:(.data.rel.ro._D4main9TestClass6__vtblZ[_D4main9TestClass6__vtblZ]+0x10): undefined reference to `_D6object6Object8opEqualsMFC6ObjectZb'
C:\dev\repos\STM32DBlinky\Blinky\build\obj\main.o:(.data._D4main9TestClass7__ClassZ[_D4main9TestClass7__ClassZ]+0x0): undefined reference to `_D14TypeInfo_Class6__vtblZ'
C:\dev\repos\STM32DBlinky\Blinky\build\obj\main.o:(.data._D4main9TestClass7__ClassZ[_D4main9TestClass7__ClassZ]+0x28): undefined reference to `_D6Object7__ClassZ'
More information about the Digitalmars-d
mailing list