Quantcast
Channel: Mentor Graphics Communities: Message List
Viewing all articles
Browse latest Browse all 4541

ModelSim PLI question

$
0
0

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!


Viewing all articles
Browse latest Browse all 4541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>