In reply to tpan:
- Technically, it’s possible, but not practical. It involves some symbol re-naming, but there is no way to pass the argv/argc arguments its expecting
- Yes, the DPI is defined SystemVerilog centric. You have to start from SystemVerilog
- How you compile your C/C++ code and link it together is tool specific. Many tools allow you to throw everything on the command line and figure out which compiler to use based on the file extension. And that’s separate from the calling stack.
Here are some other links you might want to read: