当前位置:网站首页>Self made compiler learning 1: use of CB compiler
Self made compiler learning 1: use of CB compiler
2022-06-09 08:25:00 【I_ belong_ to_ jesus】
Cb stay C The foundation of the language has been simplified , And add some new features , Thus, the production process of the compiler is simplified , First of all Cb Compiler installation , The use system is Ubuntu 16,Cb Compiler 64 A version of the git The website is : hGitHub - leungwensen/cbc-ubuntu-64bit: Cb (C flat) compiler. Cb is simplified C.s
First , Install dependency library :
apt-get update && apt-get install -y \
gcc-multilib g++-multilib libc6-i386 lib32ncurses5 lib32stdc++6 \
openjdk-8-jre \
gitDownload and install cbc:
git clone https://github.com/leungwensen/cbc-ubuntu-64bit.git
cd cbc-ubuntu-64bit && ./install.shcompiler cbc Default installed in /usr/local/cbc/bin, Note that it is added to the environment variable PATH.
Create the first program file test_cb.cb:
import stdio;
int
main(int argc, char **argv)
{
printf("Hello World!\n");
return 0;
}Execute compilation instructions ( Be careful 64 Bit system needs to be compatible 32 position ):
cbc -Wa,"--32" -Wl,"-melf_i386" cbc_test.cbAfter the compilation and execution are successful, there will be the following files in the folder :
![]()
They correspond to each other compile Generated Assembly language files :cbc_test.s, assembly Generated Target file cbc_test.o, as well as link Generated Executable file cbc_test.
边栏推荐
- Kibana:Kibana 入门 (一)
- Blow up the idea artifact in use recently
- 【TeXstudio】【1】分式dfrac,tfrac Undefined control squence错误
- RMAN备份数据库_指定备份输出选项
- Clickhouse distributed table & local table & Clickhouse realize time series data management and mining
- IELTS review 1
- 集成电路设计开源EDA软件yosys详解1:工具安装
- Market Research - current situation and future development trend of global and Chinese cosmetic grade 1,2-hexanediol Market
- RMAN备份概念_关于RMAN备份的多个拷贝
- 系统开发系列 之web开发中cookie、session和token的使用
猜你喜欢
![[reading some papers] benchmark analysis of representative deep neural network architectures when accuracy is no longer the only measure, it provides a guidance for multi-objective optimization](/img/5a/dfa1c63b1e8d6c1b21105fb3034beb.png)
[reading some papers] benchmark analysis of representative deep neural network architectures when accuracy is no longer the only measure, it provides a guidance for multi-objective optimization
![[pat (basic level) practice] - [sort] 1077 mutual evaluation score calculation](/img/0c/f9deb9b02936e1fc2a53ef3e44c6bf.jpg)
[pat (basic level) practice] - [sort] 1077 mutual evaluation score calculation

关于#oracle#的问题:为啥按照晚上教程链接DBMS还是无法输出结果
![Nacos 启动报错[db-load-error]load jdbc.properties error](/img/e0/e511da6cd6821ffb315d118a2feae9.png)
Nacos 启动报错[db-load-error]load jdbc.properties error

阿里云ack免密拉取企业版acr镜像

Graphic knowledge points: leakcanary

Nacos二次开发
![[paper introduction] clip: image and natural language pairing pre training transferable visual models from natural language supervision](/img/31/4b728c8f719d19fad798c0b55f4221.png)
[paper introduction] clip: image and natural language pairing pre training transferable visual models from natural language supervision

IELTS review 1

Blow up the idea artifact in use recently
随机推荐
使用闪回数据库(FLASHBACK DATABASE)和还原点(RESTORE POINT)
自制编译器学习2:编译的过程
阿裏雲ack免密拉取企業版acr鏡像
2022-2028 global LED ribbon industry research and trend analysis report
图解知识点:leakcanary
C language review 9
Breakthrough in customer experience in the insurance industry through low code and no code
企业运用通兑吧数字会员卡进行营销的优势
84.1% of the parents surveyed felt that there were more parents around who liked to coax their children with electronic products
RMAN备份概念_关于RMAN控制文件和服务器参数文件的自动备份
Question about Oracle: why can't the DBMS be linked according to the evening tutorial and output results
Twitter的最新功能让商家预告即将推出的产品 提醒顾客去购物
搞明白 left join、right join和join的区别
OpenInfra Summit 2022 | 安超云用户脱颖而出 入围超级用户大奖
js类的创建和constructor的构造函数的使用
Understand the difference between left join, right join and join
2022-2028 global Supplementary Cementitious Materials (SCM) industry research and trend analysis report
RMAN备份概念_关于备份保留策略(RETENTION POLICY)
RMAN备份概念_关于RMAN增量备份(RMAN INCREMENTAL BACKUP)
Nacos二次开发