草庐IT

freestanding

全部标签

C++ 独立功能

我可以在C++独立环境中使用哪些功能?我正在开发一个小内核(为了我自己的乐趣),我知道我不能使用整个stdlib库,但还有什么?当我尝试使用new和delete运算符时,它编译时没有遇到任何问题,但链接器说undefinedreferenceto`operatornew[](unsignedlong)undefinedreferenceto`operatordelete[](void*)'我链接了-lgcc和-lsupc++选项。我知道异常处理在独立模式下是禁用的,但我有点惊讶new和delete也是。那么我可以使用什么,不可以使用什么? 最佳答案