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!