mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-07-21 10:28:50 +08:00
🚀 update makefile to choose different compilers by users & fix some codes for MSVC to compile.
This commit is contained in:
+19
-3
@@ -110,11 +110,11 @@ __Windows用户请一定一定一定要使用MinGW编译!__
|
||||
|
||||
__`Windows`__(`MinGW-w64`)用户使用g++编译器并使用以下命令来进行编译. 没有编译环境的请在[__这里__](https://www.mingw-w64.org/downloads/)下载MinGW-w64。(编译不出来别怪我没说哦👿)
|
||||
|
||||
> g++ -std=c++11 -O3 main.cpp -o nasal.exe -fno-exceptions -static
|
||||
> $(CXX) -std=c++11 -O3 main.cpp -o nasal.exe -fno-exceptions -static
|
||||
|
||||
__`linux/macOS/Unix`__ 用户可以使用g++或者clang++替代下面命令中中括号的部分来进行编译。
|
||||
__`linux/macOS/Unix`__ 用户可以使用g++或者clang++替代下面命令中中括号的部分来进行编译(我们建议您使用clang)。
|
||||
|
||||
> [cpp compiler] -std=c++11 -O3 main.cpp -o nasal -fno-exceptions -ldl
|
||||
> $(CXX) -std=c++11 -O3 main.cpp -o nasal -fno-exceptions -ldl
|
||||
|
||||
当然也可以使用makefile,`mingw32-make`是 __`Windows(MinGW-w64)`__ 平台的`make`:
|
||||
|
||||
@@ -126,6 +126,22 @@ __`linux/macOS/Unix`__ 平台直接使用make即可:
|
||||
|
||||
> make nasal
|
||||
|
||||
你也可以通过在命令后面添加如下的其中一行来指定你想要使用的编译器:
|
||||
|
||||
> CXX=clang++
|
||||
>
|
||||
> CXX=g++
|
||||
>
|
||||
> CXX=...
|
||||
|
||||
如果你觉得`-O3`编译的版本不是那么安全和稳定,你也可以选择生成稳定的版本:
|
||||
|
||||
> make stable-release
|
||||
>
|
||||
> mingw32-make stable-release-mingw
|
||||
|
||||
我们现在还在尝试将项目移植到MSVC下,敬请期待。
|
||||
|
||||
## __使用方法__
|
||||
|
||||
首先我们要通过[__教程__](#教程)知道这个语言的语法以及如何使用这个解释器来运行nasal程序。
|
||||
|
||||
Reference in New Issue
Block a user