Written in ErlangProgramIf you use a proprietary technology that relies on an operating system, it cannot run on other systems.
Recently, mochiweb encountered this problem in cygwin of windows.
Mochiweb creates an app by typing:
$ Escript./scripts/new_mochiweb.erl app
The directory app is generated, including several subdirectories, source files, and shell command files.
Go to the app directory, make, and start the application server $./start. Sh.
Open the browser, http: // localhost: 8000. When a webpage appears, the program runs normally.
However, because mochiweb is developed on Linux and uses the link technology dedicated to the file system, it is not supported by windows. problems may occur during make, and of course it cannot be started.
The root cause of the problem is the Erlang function file: make_symlink/2.
Test in eshell:
1> file: make_symlink ("1", "2 ").
{Error, enotsup}
2>
It means: "error: Erlang not support"
Solution:
Modify the content of the three files scripts/new_mochiweb.erl, src/mochiweb_skel.erl, APP/start. Sh
Everything is normal.
Nitrogen installed on mochiweb has the same problem. The solution is the same as above.