跳转至

开始

安装 FuckCode

FuckCode 是用 Python 编写的 FuckLang 编译器

选择安装方式:

Tip

打包版只支持 amd64 架构

Quote

便携版自带w64devkit以提供编译功能

下载

请访问 发布页 找到 fuckcode-portable-x64.zip 并且下载

安装

将压缩包解压,并且将解压后的目录添加到环境变量 PATH

Info

这需要你自己配置 GCC 编译器,其他编译器( MSVC 等)也正在适配

下载

请访问 发布页 找到 fuckcode.exe 并且下载

安装

将此文件放在一个有PATH的目录中(或许你可以尝试 C:\Windows ?但最好还是有一个单独的目录)

Info

这需要你自己配置 GCC 编译器,其他编译器( MSVC 等)也正在适配

首先,你需要一个 Python 3.8+(推荐总是比最新的 Python Release 低一个版本)的 pip 这里我们假设其通过 pip3 调用,如果你的不是,请换用其他的

下载并安装

请执行:

pip3 install -U fuckcode

安装完毕

Hello, world!

通过编写一个输出 Hello, world! 的程序熟悉 FuckLang 的编写吧!

创建一个新的文件夹,并在其中创建一个名为 test.fl 的文件,写入以下内容:

test.fl
#include <iostream>
using namespace std

int main():
    cout << "Hello, world!" << endl
    return 0

保存后,在当前目录运行以下命令以编译:

> fuckcode compiler test.fl -o test.exe
正在编译...
已编译到 test.exe
接下来,执行:
> ./test.exe
Hello, world!

> fuckcode compiler test.fl -o test.out
正在编译...
已编译到 test.exe
接下来,执行:
> ./test.out
Hello, world!

如果没有错误,证明你已经安装成功!