It would help to provide the error message as well as a complete example.
I suspect that you have encountered a tool bug. realtime is synonym for real and real types are compatible with the float datatype in C.
This Mentor/Siemens EDA sponsored public forum is not for discussing tool specific usage or issues. Please read your tool’s user manual or contact your tool vendor directly for support.
#include "dpi.h"
#include <iostream>
using namespace std;
extern "C" void get_period(double* rt);
extern "C" void C_main() {
double p;
get_period(&p);
cout << "Period is " << p << "\n";
}
Most tools provide an automatic header (dpi.h) file so you can match your code’s prototypes with the required prototypes and get a compiler error if they do not match.