I am trying to compile and link the runtime support code for Verilator (veripool.org). It builds fine, but for some reason there are a couple of methods which aren't showing up in the pertinent object file, Verilated::timeunit(int) and Verilated::timeprecision(int).
Those are ostensibly defined in include/verilated.h:
static int timeunit() VL_MT_SAFE { return Verilated::threadContextp()->timeunit(); }
static int timeprecision() VL_MT_SAFE { return Verilated::threadContextp()->timeprecision(); }
Now, you can see that there is a parameter to both methods of type int in the calling function which shows up in the linking step:
ld: /home/jon/controlix/src/nuttx/nuttx/staging/libcontrols.a(Vhello_world__ALL.o): in function `Vhello_world::__Vconfigure(Vhello_world__Syms*, bool)':
Vhello_world__ALL.cpp:(.text+0x15): undefined reference to `Verilated::timeunit(int)'
Vhello_world__ALL.cpp:(.text+0x15): relocation truncated to fit: R_X86_64_PLT32 against undefined symbol `Verilated::timeunit(int)'
ld: Vhello_world__ALL.cpp:(.text+0x20): undefined reference to `Verilated::timeprecision(int)'
Vhello_world__ALL.cpp:(.text+0x20): relocation truncated to fit: R_X86_64_PLT32 against undefined symbol `Verilated::timeprecision(int)'
l
I have tried changing the method declarations in verilated.h to take an int as a parameter even though lack of that should cause a compile-time error, but still those two method declarations don't show up in the symbol table for verilated.cpp. Other methods in the Verilated:: class show up just fine.
What am I missing?