为了在Windows上运行我的第一个NIF项目,我遵循以下步骤:
-
下载海洛尼夫 -大师 :https://github.com/vmx/hellonif
-
打开命令提示符(cmd):
2.1 cd C:\Users\Desktop\hellonif-master =>project path
2.2 设置路径=C:\程序文件\C:\程序文件\erl6.4\bin => 脚本路径
-
将这一行添加到 rebar.config: {port_env, [{"CC", "/C:/Program Files (x86)/CodeBlocks/MinGWp/bin/mingw32-gcc"}]}.
-
打开命令提示符(cmd)
4.1 钢筋编译
不幸的是,我遇到了这个错误:
hellonif-master (compile)
compiling C:UsersDesktophellonif-masterc_srchello.c
La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte.
你能帮我解决这个问题吗,提前谢谢
您的CC
路径无效。标准窗口文件路径表示法为
"Drive:dirdirfile".
此外,Windows在命令行级别上接受直斜杠,这给了你
"Drive:/dir/dir/file".
一些移植的Linux应用程序需要mingw或cygwin路径格式:
Mingw: "/drive/dir/dir/file"
Cygwin "/cygdrives/drive/dir/dir/file"
您的"/Drive:/dir/dir/file"
无效。
但是,您可以将CC路径添加到搜索路径列表(PATH
),并为编译器使用标准cc
或gcc
文件名(Mingw提供这两个应用程序作为mingw32-gcc
的引用)