0
votes

In order to run my first NIF project on Windows i followed these steps:

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

  2. open command prompt(cmd):

    2.1 cd C:\Users\Desktop\hellonif-master =>project path

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

  3. added this line to rebar.config: {port_env, [{"CC", "/C:/Program Files (x86)/CodeBlocks/MinGWp/bin/mingw32-gcc"}]}.

  4. open command prompt(cmd)

    4.1 rebar compile

Unfortunately I had this error :

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.

Can you please help me to resolve this problem thanks in advance

1
Can you please unlocalize error message? - Lol4t0
sorry for using french this is the translation of error message:The syntax of the file name, directory or volume is incorrect. - Bou6

1 Answers

0
votes

Your CC path is invalid. Standard windows file path notation is

 "Drive:\dir\dir\file". 

Also windows accepts straight slash on the command line level, that gives you

"Drive:/dir/dir/file".

Some ported Linux applications require mingw or cygwin path format:

Mingw: "/drive/dir/dir/file"
Cygwin "/cygdrives/drive/dir/dir/file"

Your "/Drive:/dir/dir/file" is not valid.

However, you can just add your CC path to your search path list (PATH), and use standard cc or gcc file name for compiler (Mingw provides both applications as references to mingw32-gcc)