How to use C++ test program in verilator simulation framework
Hi, I want to write C++ test programs to test my RoCC better in the verilator simulation environment. And when I compile my source C++ code in the FireMarshal/test/rocc/ folder to link files related to the system call, like syscall.c etc,I encounter such error :

It seems like the riscv64-unknown-elf-g++ compiler can not compiler the syscall.c .
But if I use riscv64-unknown-elf-g++ to compile the user program and use riscv64-unknown-elf-gcc to compile files related to the system call, when linking the object files, there will show many "undefined reference to ***" errors: "/chipyard/riscv-tools-install/lib/gcc/riscv64-unknown-elf/9.2.0/../../../../riscv64-unknown-elf/bin/ld: conv_funct_test.cc:(.text.ZNSt6vectorIhSaIhEEC2EmRKhRKS0[ZNSt6vectorIhSaIhEEC5EmRKhRKS0]+0x28): undefined reference to `operator new(unsigned long)'"
So is there any method to support the C++ test program in the verilator simulation environment? Thank a lot.
Using pk is ok. No need to link the C system call files.