c4,configure the debug environment
Yesterday I found a tiny C compiler (less than 600 line of C code, containing commits) called "c4" on github and I wanted to know how I can write a compiler in details.
During the process, I encounter the following problems:
1> Can not compile c4 on Windows platform, because no "unistd.h" on Windows.
solution: replace the include sentence by the following statements:
所以用VC编译总是报错。把下面的内容保存为unistd.h,可以解决这个问题。
- /** This file is part of the Mingw32 package.
- * unistd.h maps (roughly) to io.h
- */
- #ifndef _UNISTD_H
- #define _UNISTD_H
- #include <io.h>
- #include <process.h>
- #endif /* _UNISTD_H */
2> IDEs:
First tried Vitual Studio 2013, it was hard for me to get used the VS after some many years' leave. I could not find the proper functions to satisfy my needs.
Eclipse: Downloaded the Eclipse-CDT(for C/C++ development). Dowload the minGW project, containing the gcc and other lib file for windows. Configure eclipse, it is not complicated after I configure the BarLearner project from Cristian. Just make the build system right, and adjust the run configuration. But I fould I could not the value of global values and for most pointers, I could only see the address its point to rather than the content (for example, I wanted to see an array, but got nothing useful for me.) Searching on the Internet, someone said we can see the global values on "Watch" windows. However, I did not think so after trying. I gave it up temporary.
VC6.0: This is a very old platform I had been working on for years. It took me time to install VC 6.0 on Windows 8.1. Here are some useful solution for the installation:
2 兼容模式修改成 winxp sp2 或者sp3
3 启动MSDEV3.EXE,如果报错,关闭,立刻再次启动,一般就可以正常启动了,成功启动一次后,以后就可以正常运行了
4 取消兼容模式,如果运气好,也可以正常运行了,如果不介意,就一直用兼容模式运行也可以"
c4,configure the debug environment的更多相关文章
- DVWA----DVWA System error - config file not found. Copy config/config.inc.php.dist to config/config.inc.php and configure to your environment.
DVWA简介:DVWA(Damn Vulnerable Web Application)是一个用来进行安全脆弱性鉴定的PHP/MySQL Web应用,旨在为安全专业人员测试自己的专业技能和工具提供合法 ...
- 获取项目中文件,存放到Debug中。
说起这个,还真是费了一般功夫. 说个最简单的方法: 第一步:把需要生成到Debug中的文件放到项目中(注意:当前文件夹目录是什么样的,存放到Debug中也是什么样) 第二部:设置文件属性中 复制到输出 ...
- 在进行make之前,configure的时候,请先清理config.cache
在进行make之前,configure的时候,请先清理config.cache
- VC中出现“烫”和“屯”的原因(栈区的每一个字节都被0xCC填充了,也就是int 3h的机器码,动态分配的堆,VC的Debug用0xCD填充堆的空间,就出现了“屯”)
相信经常用VC的朋友对屏幕输出的一大堆“烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫”不会陌生,但是也许会很奇怪,为什么会出现“烫”字呢?莫非改程序导致系统运行缓慢,发热过高???非也!下面让我解释 ...
- MinGW 编译 libsndfile-1.0.25(只要有 MSYS,./configure make make install 就行了)
最近做的一个项目需要读写 wav 文件.在网上找到 libsndfile 刚好满足我的需要.但是编译的时候遇到了点小麻烦,这里记录一下编译的过程,免得下次再编译时忘记了. 因为是在编译完成若干天后写的 ...
- iOS应用发布打包时为什么选择release,而不是debug
一.Debug和Release版本区别? 众所周知,我们进行iOS开发,在Xcode调试程序时,分为两种方式,Debug和Release,在Target的Setting中相信大家应该看到很多选项都分为 ...
- HBase二次开发之搭建HBase调试环境,如何远程debug HBase源代码
版本 HDP:3.0.1.0 HBase:2.0.0 一.前言 之前的文章也提到过,最近工作中需要对HBase进行二次开发(参照HBase的AES加密方法,为HBase增加SMS4数据加密类型).研究 ...
- 使用eclipse启动tomcat,正常模式下可以启动tomcat,却在debug模式下无法启动tomcat 问题解决
这个问题可能是由于eclipse和tomcat的交互而产生的,在以debug模式启动tomcat时,发生了读取文件错误,eclipse自动设置了断点,导致tomcat不能正常启动. 解决方法把brea ...
- 安装php,nginx 带debug
gdb安装包 在CentOS6.4下使用gdb进行调试的时候, 使用bt(breaktrace)命令时,会弹出如下的提示: 头一天提示: Missing separate debuginfos, ...
随机推荐
- SQLiteDatabase 基本操作
一.SQLiteOpenHelper类 android 提供类SQLiteOpenHelper帮助用户简化对SQLite数据库的操作.该类是一个抽象类,必须用户自己实现并重写oncreate()和on ...
- linux学习网站分享
http://www.zhihu.com/question/19895288 http://linux.vbird.org/ 两个linux学习的网页存起来,以后学习.
- 支撑双十一的,不仅仅是AliSQL,也不仅仅是Oceanbase
全棉时代,作为稳健医疗集团的全资子公司,传承了稳健医疗集团在医用棉制品行业20年的专业技术和生产经验,以其独创的 "全棉水刺无纺布专利工艺"为核心技术载体,成功实现了医用产品向民用 ...
- 阿里巴巴、美团等各大互联网公司的 Java类 校招对本科生有什么要求?
转载: 阿里巴巴.美团等各大互联网公司的 Java类 校招对本科生有什么要求?
- centos 6.5重置Root密码
按任意键进入菜单界面 在开始引导的时候,进入开机启动界面(如下图) 然后按一下键盘上面的"e" 3.进入如下图界面,我这边选择第二个按下键盘上的"e"键.(不同 ...
- python——Django(ORM连表操作)
千呼万唤始出来~~~当当当,终于系统讲了django的ORM操作啦!!!这里记录的是django操作数据库表一对多.多对多的表创建及操作.对于操作,我们只记录连表相关的内容,介绍增加数据和查找数据,因 ...
- 如何使用Notepad++编译运行php
安装编译运行文件的插件.插件-Plugin Manager-Show Plugin Manager. 找到NppExec插件,从这个插件的名字来看就是各位文件的执行.点击Install.需要下载安装, ...
- category - junit用例分组执行
一.category 和 testSuite的比较 (1)testSuite是类级分组(xx.class) (2)category是用例级分组(@Test) (3)category是testSuite ...
- Vue2.X的状态管理vuex记录
记住上述的顺序情况:想要改变state,只能通过Mutation,虽然action可以直接改变state,这样会使每个状态可以方便的跟踪和记录(用Devtools跟踪) vue Method -- ...
- JS实现 点击button(copy) 复制对应的网址——类似于复制推广链接
<form action=""> <input type="text" class="share-input" value ...