专栏
标签
Sysplorer报错无法解析的外部符号 realString/integerString,如何处理?
技术分享
发布于 2025-08-08 10:42:30
查看 5过去325天

问题现象

image.png

解决方法

原因为realString、IntegerString不满足modelica建模规范的语法
将realString、IntegerString类型转换,修改为标准的String类型转换,如下例所示:

示例:旧版中不会报错,新版中生成求解器失败
model E4
constant Real a = 1;
Integer b = 2;
String s1 = realString(a);
String s2 = integerString(b);
end E4;

修改方法:使用标准的String函数

model E4
constant Real a = 1;
Integer b = 2;
String s1 = String(a);
String s2 = String(b);
end E4;

所属专栏:Sysplorer基础平台
产品信息:Sysplorer系统建模仿真环境
系统建模

全部回答 1

发布于 2025-08-08 12:32:47

无法解析外部符号无法解析的外部符号 TwoPhaseMedium_setState_hs_C_impl_err,该怎么处理呢?下方是输出的内容

正在创建库 E:\PhD\MWORKS\Simulation\MwSolver_250808_085834_156\MWSolver.lib 和对象 E:\PhD\MWORKS\Simulation\MwSolver_250808_085834_156\MWSolver.exp
momodel_extern_inc.obj : error LNK2019: 无法解析的外部符号 TwoPhaseMedium_setState_hs_C_impl_err,函数 TwoPhaseMedium_setState_hs_C_impl_wrap 中引用了该符号
E:\PhD\MWORKS\Simulation\MwSolver_250808_085834_156\MWSolver.dll : fatal error LNK1120: 1 个无法解析的外部命令
找不到 E:\PhD\MWORKS\Simulation\MwSolver_250808_085834_156\mo*.obj
error code: 4.
Linking the model (vc) failed. "If c compiler reports: one or more multiply defined symbols found, check c compile setting: Allow symbol redefinition (Note that this may cause unexpect behavoir, please make sure same sysmbol has the same meaning and context) may avoid this issue."

用户
和原帖交流更多问题细节吧,去
我要发帖 我要发帖
资料中心 资料中心
查看更多>
热门帖子 热门帖子
主要贡献者 主要贡献者
过去7天