Hi,
I would like to start taking the meaty skeleton project and change the kernel.c to kernel.cpp
I took the meaty skeleton project and changed a few things so it would work with cpp:
* I renamed kernel.c to kernel.cpp
* I added extern "C" on function prototypes where needed
* I added export CPP=${HOST}-g++ to config.sh
* I added ffreestanding -nostdlib -fno-exceptions -fno-rtti to CCFLAGS in the makefile
* I added this to the makefil:
.cpp.o:
$(CPP) -MD $(CPPFLAGS) $< -o $@
The problem is I get undefined refernces to any external functions e.g. printf, serial_init, terminal_initialize
Im sure the problem is quite basic but I have less experience with C++ and makefiles
A repository with the changes I did is here:
https://github.com/heavyweight87/SakuraOS/tree/cppAny ideas?