Correctly printing from SystemVerilog DPI
DPI doesn't have special print commands. You can use regular C printf() or std::cout &lt;&lt; "Your Message Here" &lt;&lt; std::end. Some reasonable tutorials can be found with your preferred search engine with [systemverilog dpi] as your search term.

If you want to be lazy, you can keep #include &lt;vpi_user.h&gt; in your DPI files to keep using vpi_printf()

Alternatively, have your DPI call a SV function. With this method, adding the simulator's time-stamp is possible. Example:

my_sv.sv:

// ...
export "DPI-C" function dpi_print;
function void dpi_print(input string msg);
  $display("%t :: %s", $time, msg);
endfunction : dpi_print
// ...


my_dpi.c :

#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include "svdpi.h"
...
extern dpi_print(const char* msg);
....
int some_c_func( /* ... */ ) {
  // ...
  dpi_print("message");
  // ...
}