- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在创建一个混合 escript,一切看起来都很好,但我无法调用生成的 escript 可执行文件。
>混合 escript.build
lib/cmdlineutil.ex:2: warning: variable args is unused
Compiled lib/cmdlineutil.ex
Generated cmdlineutil.app
Consolidated Access
Consolidated Collectable
Consolidated Enumerable
Consolidated Inspect
Consolidated List.Chars
Consolidated Range.Iterator
Consolidated String.Chars
Consolidated protocols written to _build/dev/consolidated
Generated escript cmdlineutil with MIX_ENV=dev
>cmdlineutil
'cmdlineutil' is not recognized as an internal or external command, operable program or batch file.
>mv cmdlineutil cmdlineutil.exe
>cmdlineutil.exe
This version of C:\Git\elixir\cmdlineutil\cmdlineutil.exe is not compatible with the version of Windows that you're running. Check your computer's system information and then contact the software publisher.
消息框:
Unsupported 16-Bit Application
The program or feature "\??\C:\Git\elixir\cmdlineutil\cmdlineutil.exe" cannot start or run due to incompatibility with 64-bit versions of Windows. Please contact the software vendor to ask if a 64-bit Windows compatible version is available.
lib\cmdlineutil.ex:
defmodule CmdLineUtil.Echo do
def main(args) do
IO.puts "Hello!"
end
end
mix.exs:
defmodule CmdLineUtil.Echo.Mixfile do
use Mix.Project
def project do
[app: :cmdlineutil,
version: "0.0.1",
elixir: "~> 1.0.0",
escript: escript,
deps: deps]
end
def escript do
[main_module: CmdLineUtil.Echo]
end
# Configuration for the OTP application
#
# Type `mix help compile.app` for more information
def application do
[applications: [:logger]]
end
# Dependencies can be Hex packages:
#
# {:mydep, "~> 0.3.0"}
#
# Or git/path repositories:
#
# {:mydep, git: "https://github.com/elixir-lang/mydep.git", tag: "0.1.0"}
#
# Type `mix help deps` for more examples and options
defp deps do
[]
end
end
最佳答案
Erlang 安装了一个 escript 命令。
>escript cmdlineutil
关于windows - 如何在 Windows 8.1 上运行 Elixir 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26569257/
我是一名优秀的程序员,十分优秀!