首页 > 解决方案 > VC2015 中的 FMI 实现

问题描述

我正在 vc2015 中实现联合仿真。当我尝试使用 LoadLibraryA 加载从 fmi1.0 生成的 dll 文件时,它成功了。但是当我尝试从 fmi2.0 加载 dll 时,它总是以 hMod=NULL 失败。任何人都知道如何解决它?

#include "stdafx.h"
#include <atlstr.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "fmi2Functions.h"
#include "fmi2FunctionTypes.h"
#include "fmi2TypesPlatform.h"
#include "zh.h"
int main() {
    CString dll_name= "Node1.dll";
    HMODULE hMod;
    char strVer[50] = "";
    strcat_s(strVer, "Node1");
    strcat_s(strVer, "_fmi2InstantiateSlave");
    hMod = LoadLibraryA("Unnamed.dll");


}

标签: implementationfmi

解决方案


推荐阅读