45down voteaccepted Just use M cross environment (MXE). It takes the pain out of the whole process: Get it: $ git clone https://github.com/mxe/mxe.git Read More
posted @ 2017-01-05 07:12 findumars Views(341) Comments(0) Diggs(0)
简介 采用mingw32可以在linux下直接编译c程序输出为windows下的exe程序或dll链接库。 个人编译的纯c程序(不含winapi),主要是c99程序,通常采用gcc/cc编译调试后,再用mingw输出win目标文件。 linux下目标程序及共享库与windows下的应用程序及链接库不 Read More
posted @ 2017-01-05 07:08 findumars Views(4125) Comments(0) Diggs(0)
开源不乏神人,于是有了MinGW(Minimalist GNU for Windows),又称mingw32,是将GCC编译器和GNU Binutils一直到Win32平台下,包含一系列头文件、库和可执行文件。另有mingw64,可产生64位Windows可执行文件的GNU交叉编译器。然后很多开发者 Read More
posted @ 2017-01-05 07:06 findumars Views(4001) Comments(0) Diggs(0)
Ubuntu下可以直接安装: sudo apt-get install mingw32 mingw32-binutils mingw32-runtime 安装后编译程序可以: i586-mingw32msvc-g++(编译C++程序) i586-mingw32msvc-gcc(编译C程序) 用法和g Read More
posted @ 2017-01-05 06:40 findumars Views(694) Comments(0) Diggs(0)
作者:rendao.org,版权声明,转载必须征得同意。 内存越界,变量被篡改 memset时长度参数超出了数组长度,但memset当时并不会报错,而是操作了不应该操作的内存,导致变量被无端篡改 还可能导致内存越界的函数有memset、memcpy、memmove、strcpy、strncpy、st Read More
posted @ 2017-01-05 06:06 findumars Views(2628) Comments(0) Diggs(0)