C语言开发环境Code:Blocks的安装及中文乱码解决

下载链接  http://www.codeblocks.org/downloads/26

我选择:codeblocks-16.01mingw-nosetup.zip  表示带mingw(gcc编译环境),绿色非安装版本,压缩包88M,解压后228M

解压后,双击CbLauncher.exe运行,

windows下解决乱码问题,请按照如下图所示配置:

-finput-charset=WINDOWS-936
-fexec-charset=WINDOWS-936

测试C语言代码:

#include<stdio.h>
#include<stdlib.h>
#include<wchar.h>
#include<string.h>
#include<locale.h>
int main(void)
{

 char str[]="中国china";
 wchar_t str_w[]=L"中国china";

 int len=(int)strlen(str);
 int len_w=(int)wcslen(str_w);
 printf("%s,size=%d/n",str,len);

 setlocale(LC_ALL, "chs");
 wprintf(L"%s,size=%d/n",str_w,len_w);

 system("pause");
 return 0;
}

参考 http://blog.csdn.net/softman11/article/details/6121538

codeblocks-17.12mingw-nosetup 免安装版 下载解压之后就可以直接使用无需安装 文件列表: Addr2LineUI.exe CbLauncher.exe cbp2make.exe cb_console_runner.exe cb_share_config.exe codeblocks.dll codeblocks.exe dbghelp.dll exchndl.dll mgwhelp.dll MinGW MinGW\bin MinGW\bin\addr2line.exe MinGW\bin\ar.exe MinGW\bin\as.exe MinGW\bin\c++.exe MinGW\bin\c++filt.exe MinGW\bin\cpp.exe MinGW\bin\dlltool.exe MinGW\bin\dllwrap.exe MinGW\bin\elfedit.exe MinGW\bin\g++.exe MinGW\bin\gcc-ar.exe MinGW\bin\gcc-nm.exe MinGW\bin\gcc-ranlib.exe MinGW\bin\gcc.exe MinGW\bin\gcov.exe MinGW\bin\gdb.exe MinGW\bin\gdbserver.exe MinGW\bin\gprof.exe MinGW\bin\ld.bfd.exe MinGW\bin\ld.exe MinGW\bin\libatomic-1.dll MinGW\bin\libcharset-1.dll MinGW\bin\libgcc_s_dw2-1.dll MinGW\bin\libgcc_s_sjlj-1.dll MinGW\bin\libiconv-2.dll MinGW\bin\libintl-8.dll MinGW\bin\libquadmath-0.dll MinGW\bin\libssp-0.dll MinGW\bin\libstdc++-6.dll MinGW\bin\libwinpthread-1.dll MinGW\bin\mingw32-c++.exe MinGW\bin\mingw32-g++.exe MinGW\bin\mingw32-gcc-4.9.2.exe MinGW\bin\mingw32-gcc-ar.exe MinGW\bin\mingw32-gcc-nm.exe MinGW\bin\mingw32-gcc-ranlib.exe MinGW\bin\mingw32-gcc.exe MinGW\bin\mingw32-make.exe MinGW\bin\mingwm10.dll MinGW\bin\nm.exe MinGW\bin\objcopy.exe MinGW\bin\objdump.exe MinGW\bin\ranlib.exe MinGW\bin\readelf.exe MinGW\bin\size.exe MinGW\bin\strings.exe MinGW\bin\strip.exe MinGW\bin\windmc.exe MinGW\bin\windres.exe MinGW\bin\zip.exe MinGW\bin\zlib1.dll MinGW\COPYING.ISL.txt MinGW\COPYING.MinGW.txt MinGW\COPYING.RUNTIME-gcc-tdm.txt MinGW\COPYING.winpthreads.txt MinGW\COPYING3-gcc-tdm.txt MinGW\COPYING3.LIB-gcc-tdm.txt MinGW\doc MinGW\doc\runtime MinGW\doc\runtime\CONTRIBUTORS MinGW\doc\runtime\DISCLAIMER MinGW\doc\runtime\README MinGW\include MinGW\include\accctrl.h MinGW\include\aclapi.h MinGW\include\aclui.h MinGW\include\adsprop.h MinGW\include\afxres.h MinGW\include\amaudio.h MinGW\include\amvideo.h MinGW\include\assert.h MinGW\include\audevcod.h MinGW\includ
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值