SamyPesse / How-to-Make-a-Computer-Operating-System

How to Make a Computer Operating System in C++
https://samypesse.gitbook.io/how-to-create-an-operating-system
Apache License 2.0
21.34k stars 3.42k forks source link

Undefined reference error on deleting objects #172

Closed RichCini closed 3 years ago

RichCini commented 3 years ago

Hi. Just downloaded fresh archive to play with. On linking, the linker throws errors on a lot of the object files: "undefined reference to `operator delete(void*, unsigned int)'". Looks like it happens when deleting certain objects in the file system, process, and device core files using the "delete" command. Using g++ 9.3.0 on Ubuntu 20.04.

Any clues appreciated! Thanks. Rich

RichCini commented 3 years ago

Appears this was answered under Issue #127. Add the following to file cxx.cc:

void operator delete(void * ptr, size_t size) { ::operator delete(ptr); }