为什么会出现链接错误?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
### Linking ...
D:\Program Files\MATLAB\R2013a\sys\perl\win32\bin\perl D:\Program Files\MATLAB\R2013a\rtw\c\tools\mkvc_lnk.pl test.lnk test.obj rtGetInf.obj rtGetNaN.obj rt_logging.obj rt_nonfinite.obj rt_main.obj
'D:\Program' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
NMAKE : fatal error U1077: 'D:\Program' : return code '0x1'
Stop.
The make command returned an error of 2
'An_error_occurred_during_the_call_to_make' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
### Build procedure for model: 'test' aborted due to an error.
0 comentarios
Respuestas (2)
chengxiang zhang
el 22 de Feb. de 2021
因为有空格的的文件路径报错,可能是windows 的NTFS文件系统没有开启对以前DOS 8.3格式文件名规范兼容性。导致存在空格的文件夹没有生成8.3兼容格式文件名,一些‘古老’程序无法用8.3格式短名称来访问找到文件,导致报错。
这里有几行cmd代码可以检查,开启,并手动指定短文件名(可以免除重装的麻烦)
检查NTFS驱动是否开启8.3兼容特性:fsutil behavior query disable8dot3
开启8.3兼容特性 :fsutil behavior set disable8dot3 0
手工指定一个8.3短名称:fsutil file setshortname <longname> <8.3name>
eg:fsutil file setshortname "C:\Program Files" PROGRA~1
dir <目录>/x 列出指定目录的子目录和文件,以及相应的8.3兼容名称(如果有的话)
eg:dir C:\ /x
1 comentario
Walter Roberson
el 21 de Dic. de 2015
The problem is the space in the directory name. You will need to install MATLAB in a directory that has no space in the name (and no character outside the range '!' to '~', 33 to 126)
2 comentarios
Image Analyst
el 21 de Dic. de 2015
Lots of people have MATLAB installed in the Program Files folder. I don't know what the problem is since I can't read Chinese, but I suspect he's passing in a folder name on a command line, and in that case if there are spaces, it will split the argument up into multiple arguments. I do this in some of my programs, so what I have to do is to know that I'm passing in a single folder name, and if there are multiple arguments, I need to concatenate them all together.
Walter Roberson
el 21 de Dic. de 2015
This was the automatic generation of a Simulink model in R2013a; the handling of spaces and special characters was historically weak in Simulink. filenames not quoted :(
Ver también
Categorías
Más información sobre MATLAB Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!