AnsweredAssumed Answered

ModelSim PLI question

Question asked by baev_al on Dec 3, 2015
Latest reply on Dec 18, 2015 by spektra_th

Hello friends.

I try to test PLI.

I have ModelSim PE Student Edition 10.4a installed as well as MinGW.

Here is a c file:

#include "D:\Modeltech_pe_edu_10.4a\include\veriuser.h"

static PLI_INT32 hello()

{

io_printf("Hi there\n");

return 0;

}

s_tfcell veriusertfs[] = {

{usertask, 0, 0, 0, hello, 0, "$hello"},

{0} /* last entry must be 0 */

};

 

The object file is achieved as following:

g++ -c hello.c

 

On the stage of dll I achieve an error:

g++ -shared -o hello.dll hello.o

undefined reference to '_imp__io_printf'

 

What is my mistake?

Thanks!

Outcomes