致命错误C1083:无法打开源文件:“. . \ \…\ . .MATLAB \程序文件\ \ R2017a \ rtw \ c \ src \ \ rt_main。c:没有这样的文件或目录[Using Code Generation in Simulink]
29日视图(30天)
显示旧的评论
我试图建立仿真软件模型使用Visual Stud万博1manbetxio 2012 c++编译器构建就是好。然而,包括在项目是两个c文件,即:
rt_main.c
rt_logging.c
当我试图构建模型在Visual Studio 2012中,它给了我错误的标题。目录的. . \ \…\ . .MATLAB \程序文件\ \ R2017a \ rtw \ c \ src \ \ rt_main。c:我不能找到一个名为rt_main的文件。c,但我可以找到一个名叫rt_main.cpp。rt_logging相同。c文件。我试着改变名字的地方没有运气。
1). c文件中包含的项目,为什么当我有特定的
代码生成选项
通系统的目标文件。tlc(创建Visual C / c++解决方案文件仿真软件编码器)与c++语言?万博1manbetx
2)如何让使用rt_main模型构建万博1manbetx。cpp文件?
如果我不选中“仅生成代码”的复选框
配置参数- >代码生成- >构建过程
,它给我的错误:
1 > - - - - - -构建开始:项目:SimulinkMo万博1manbetxdelDLL,配置:调试x64- - - - - -
1 >建立开始15-03-2021 12:01:44。
1 > InitializeBuildStatus:
1 >创建“x64 \调试\ S万博1manbetximulinkModelDLL.unsuccessfulbuild”因为“AlwaysCreate”指定。
1 > ClCompile:
1 > rt_main.c
1 > c1:致命错误C1083:无法打开源文件:“. . \ \…\ . .MATLAB \程序文件\ \ R2017a \ rtw \ c \ src \ \ rt_main。c:没有这样的文件或目录
1 > rt_logging.c
1 > c1:致命错误C1083:无法打开源文件:“rt_logging。c:没有这样的文件或目录
1 >生成代码…
1 >
1 >构建失败了。
1 >
1 >时间00:00:00.12
= = = = = = = = = =构建:0成功,1失败,最新的,0跳过= = = = = = = = = =
10评论
Fangjun江
2021年3月15日
好吧,我认为你可以在仿真软件生成代码“好但不是“构建”,因为那些“构建”MATLAB命令窗口万博1manbetx中的错误。
出乎我意料的是,我发现只有rt_main。但不是rt_main c R17b和R18b文件夹。cpp文件。
你在哪里找到这个文件,你能打开它看看“抽象”在文件的开始吗?
拉姆Visgaard
2021年3月15日
有趣,因为这里的其他方式。我可以找到rt_main。cpp rt_main.c。我发现它是相同的文件夹的文件夹找rt_main VS。c:
C:\Program Files\MATLAB\R2017a\rtw\c\src\common
文摘:
/ *
版权2012 - 2015MathWorks公司。
*
*文件:rt_main.c
*
*文摘:
*
*一个实时主要在大多数运行仿真软件编码器生成代码万博1manbetx
*操作系统。基于多任务的定义,一个单任务操作
*或多任务采用阶跃函数。
*
*此文件创建一个自定义主要是一个有用的起点什么时候
*针对自定义浮点处理器或整数微控制器。
*
*另外为ERT目标,你可以生成一个示例ert_main。c文件
*与生成的代码通过选择“主程序生成一个例子”
*选项。在这个情况下,ert_main。c是精确定制的
*需求模型。
*
*需要定义:
*
*模型——模型的名字
* NUMST——的数量样品时间
*
* /
拉姆Visgaard
2021年3月16日
我试图将. cpp文件重命名为. c,再次尝试。我得到以下错误:
我已经重新命名一些专有的理由XXXXX的目录。
构建16-03-2021 13:29:46开始。
1 >项目“C: \ XXXXXX \刃的\ 万博1manbetxSimulinkModelDLL_grt_rtw \ msvc \ SimulinkModelDLL.vcxproj”在节点2(构建目标(s))。
1 > InitializeBuildStatus:
创建“x64 \调试\ S万博1manbetximulinkModelDLL.unsuccessfulbuild”因为“AlwaysCreate”指定。
ClCompile:
C:\Program Files (x86)\Microsoft视觉Studio 11.0 \ VC \ bin \ x86_amd64 \ CL。exe / c / IC: \ XXXXXX \刃的/我“c: \ Program Files \ MATLAB \ R万博1manbetx2017a \仿真软件\包括\ sf_runtime”/ IC: \ XXXXXX \刃的\ SimulinkModelDLL_grt_rtw /我“c: \ Program Files \ extern MATLAB \ R2017a \ \包括“/我”c: \ Program Files \ MATLAB \ R2017a \仿真软件\包括”/我“c: \ Program Files \ MATLAB \ R2017a \ rtw \ c \ src”/我“c: \ Program Files \ MATLAB \ R2017a \ rtw \ c \ src \ ext_mode \常见/子/不带标识/ W2 / WX - WIN32 / D _DEBUG / Od / D / D _CONSOLE = SimulinkModelDLL / D / D模型NUMST = 1 / D NCSTATES RT = = 0 / D HAVESTDIO = / D / D USE_RTMODEL = / D MAT_FILE = 1 / D INTEGER_CODE = 0 / D吨= 0 / D CLASSIC_INTERFACE = 0 / D ALLOCATIONFCN = 0 / D ONESTEPFCN = 1 / D TERMFCN = 1 / D MULTI_INSTANCE_CODE = 0 / D TID01EQ = 0 /通用- / EHsc / RTC1 / MDd / GS / fp:精确/佐:wchar_t /佐:forScope / Fo / Fd“x64 \调试\ \ x64 \ \ vc110调试。pdb / Gd / TC / errorReport:提示“. . \ \…\ . .MATLAB \程序文件\ \ R2017a \ rtw \ c \ src \ \ rt_main。c””. . \ \…\ . .MATLAB \程序文件\ \ R2017a \ rtw \ c \ src \ rt_logging.c”
rt_main.c
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ xtgmath.h(111):警告C4602: # pragma pop_macro:“新的“没有以前的# pragma push_macro标识符
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (28): C2061错误:语法错误:标识符“acosf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (28): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (28): C2061错误:语法错误:标识符“asinf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (29): C2061错误:语法错误:标识符“atanf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (29): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (29): C2061错误:语法错误:标识符“atan2f”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (29): C2061错误:语法错误:标识符“ceilf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (30): C2061错误:语法错误:标识符“cosf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (30): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (30): C2061错误:语法错误:标识符“coshf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (30): C2061错误:语法错误:标识符“expf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (31): C2061错误:语法错误:标识符“fabsf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (31): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (31): C2061错误:语法错误:标识符“floorf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (31): C2061错误:语法错误:标识符“fmodf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (32): C2061错误:语法错误:标识符“frexpf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (32): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (32): C2061错误:语法错误:标识符“ldexpf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (32): C2061错误:语法错误:标识符“logf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (33): C2061错误:语法错误:标识符“log10f”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (33): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (33): C2061错误:语法错误:标识符“modff”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (33): C2061错误:语法错误:标识符“powf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (34): C2061错误:语法错误:标识符“sinf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (34): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (34): C2061错误:语法错误:标识符“sinhf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (34): C2061错误:语法错误:标识符“sqrtf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (35): C2061错误:语法错误:标识符的tanf
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (35): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (35): C2061错误:语法错误:标识符“tanhf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (37): C2061错误:语法错误:标识符“acosl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (37): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (37): C2061错误:语法错误:标识符“asinl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (38): C2061错误:语法错误:标识符“atanl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (38): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (38): C2061错误:语法错误:标识符“atan2l”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (38): C2061错误:语法错误:标识符“ceill”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (39): C2061错误:语法错误:标识符“中海油服”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (39): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (39): C2061错误:语法错误:标识符“coshl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (39): C2061错误:语法错误:标识符“expl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (40): C2061错误:语法错误:标识符“fabsl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (40): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (40): C2061错误:语法错误:标识符“floorl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (40): C2061错误:语法错误:标识符“fmodl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (41): C2061错误:语法错误:标识符“frexpl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (41): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (41): C2061错误:语法错误:标识符“ldexpl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (41): C2061错误:语法错误:标识符“logl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (42): C2061错误:语法错误:标识符“log10l”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (42): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (42): C2061错误:语法错误:标识符“modfl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (42): C2061错误:语法错误:标识符“powl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (43): C2061错误:语法错误:标识符“sinl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (43): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (43): C2061错误:语法错误:标识符“sinhl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (43): C2061错误:语法错误:标识符“sqrtl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (44): C2061错误:语法错误:标识符“tanl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (44): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (44): C2061错误:语法错误:标识符“tanhl”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (46): C2061错误:语法错误:标识符“abs”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (46): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (48): C2061错误:语法错误:标识符‘治疗’
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (48): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (48): C2061错误:语法错误:标识符“最佳”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (49): C2061错误:语法错误:标识符“:”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (49): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (49): C2061错误:语法错误:标识符“量化”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (49): C2061错误:语法错误:标识符“装天花板”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (50): C2061错误:语法错误:标识符'因为'
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (50): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (50): C2061错误:语法错误:标识符“cosh”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (50): C2061错误:语法错误:标识符“经验值”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (51): C2061错误:语法错误:标识符的晶圆厂
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (51): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (51): C2061错误:语法错误:标识符“地板”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (51): C2061错误:语法错误:标识符的作用
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (52): C2061错误:语法错误:标识符“frexp”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (52): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (52): C2061错误:语法错误:标识符“ldexp”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (52): C2061错误:语法错误:标识符“日志”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (53): C2061错误:语法错误:标识符“log10”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (53): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (53): C2061错误:语法错误:标识符“modf”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (53): C2061错误:语法错误:标识符“战俘”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (54): C2061错误:语法错误:标识符“罪”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (54): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (54): C2061错误:语法错误:标识符“sinh”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (54): C2061错误:语法错误:标识“√”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (55): C2061错误:语法错误:标识符“晒”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (55): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (55): C2061错误:语法错误:标识符的双曲正切
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (57): C2061错误:语法错误:标识符的函数
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (57): C2059错误:语法错误:“;”
1 > C: \ Program Files \ Microsoft Visual (x86)Studio 11.0 \ VC \包括\ cmath (57): C2061错误:语法错误:标识符“hypotf”
rt_logging.c
生成代码…
1 >完成建筑项目“C: \ XXXXX \刃的\ SimulinkModelDL万博1manbetxL_grt_rtw \ msvc \ SimulinkModelDLL。vcxproj”(构建目标(s))——失败。
构建失败了。
时间经过00:00:00.58
拉姆Visgaard
2021年3月19日
一些进一步的了解:
我试着改变仿真软件选项来生成c代码,我既可万博1manbetx以生成代码并构建使用visual studio 2012没有问题。这个问题似乎是,如果我想要仿真软件生成c++代码,它试图找到rt_main。万博1manbetxc和c++编译它,因为某些原因。改变rt_main的名字。rt_main c。cpp不能帮助,,还有另一个原因未知,试图找到rt_main。c文件不再存在。
答案(0)
另请参阅
一个错误发生
无法完成的行动,因为页面所做的更改。重新加载页面更新状态。
也seleccionar uno de来说《国家/语言:
科莫obtener el药对rendimiento
Seleccione中国(en语言斜纹棉布裤o单身)对位obtener el药对rendimiento。洛杉矶sitios web de还有《没有范围optimizados对位ser accedidos desde苏ubicacion geografica。