0

为了在 Windows 上运行我的第一个 NIF 项目,我遵循了以下步骤:

  1. 下载 Hellonif -master:https ://github.com/vmx/hellonif

  2. 打开命令提示符(cmd):

    2.1 cd C:\Users\Desktop\hellonif-master =>项目路径

    2.2 SET PATH=C:\Program Files\C:\Program Files\erl6.4\bin => escript 路径

  3. 将此行添加到 rebar.config: {port_env, [{"CC", "/C:/Program Files (x86)/CodeBlocks/MinGWp/bin/mingw32-gcc"}]}。

  4. 打开命令提示符(cmd)

    4.1 钢筋编译

不幸的是我有这个错误:

hellonif-master (compile)
compiling C:\Users\Desktop\hellonif-master\c_src\hello.c
La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte.

你能帮我解决这个问题吗 提前谢谢

4

1 回答 1

0

您的CC路径无效。标准的 windows 文件路径表示法是

 "Drive:\dir\dir\file". 

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),并使用标准ccgcc文件名进行编译(Mingw 提供这两个应用程序作为参考mingw32-gcc

于 2015-04-27T11:21:46.893 回答