Getting error as void* cannot be assigned to an entity of type char*
.
What should be done in order to resolve the error?
The problem occurs with xmlpath
and dllPath
.
void fmuLoad()
{
char* fmuPath;
char tmpPath[1000]="W:\\Prajwal\\GM_FMU_EXTRACT\\";
char* xmlPath;
char* dllPath;
const char *modelId;
FMU fmu;
fmuUnzip();
// parse tmpPath\modelDescription.xml
xmlPath = calloc(sizeof(char), strlen(tmpPath) + strlen(XML_FILE) + 1);
sprintf(xmlPath, "%s%s", tmpPath, XML_FILE);
fmu.modelDescription = parse(xmlPath);
free(xmlPath);
if (!fmu.modelDescription) {
exit(EXIT_FAILURE);
}
//printf(fmu.modelDescription);
#ifdef FMI_COSIMULATION
modelId = getAttributeValue((Element*)getCoSimulation(fmu.modelDescription),att_modelIdentifier);
//#else // FMI_MODEL_EXCHANGE
//modelId = getAttributeValue((Element*)getModelExchange(fmu.modelDescription), att_modelIdentifier);
#endif
// load the FMU dll
dllPath = calloc(sizeof(char), strlen(tmpPath) + strlen(DLL_DIR) + strlen(modelId) + strlen(".dll") + 1);
sprintf(dllPath, "%s%s%s.dll", tmpPath, DLL_DIR, modelId);
if (!loadDll(dllPath, &fmu)) {
exit(EXIT_FAILURE);
}
//free(dllPath);
//free(fmuPath);
//free(tmpPath);
}