简体   繁体   中英

Erlang compile error

Windows XP, Erlang R13B02 (erts-5.7.3)

Today werl desn't want compile any erlang file

c(binm). ** exception error: undefined function compile:file/2 in function c:c/2

Yesterday all work.

PS install R14B03, can't compile again

That is a very odd error. Have you by accident deleted the compile.beam file from your OTP installation? A re-installation of R13B02 might solve it, if you don't want to change the OTP version.

But if you don't need to use R13B02 for any particular reason, I recommend taking the opportunity to uninstall it and install the latest version (R14B03) instead ( http://www.erlang.org/download.html ). There have been many improvements, in particular regarding type specifications.

What does io:format("~p~n", [code:get_path()]). print? It should contain a directory like somepath/lib/compiler-4.7.2/ebin . Check that that directory actually exists, and that it contains the file compile.beam .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM