按类别列出问题

Mathematics


软件 >> C++ >> CodeBlocks
Questions in category: CodeBlocks (CodeBlocks).

1

CodeBlocks 文件编辑和程序编译的编码设置

Posted by haifeng on 2018-04-10 13:16:43 last update 2018-04-14 11:24:50 | Answers (0) | 收藏

如果编码不一致,则在编译时会出现下面的错误:

 

||=== Build: Release in Josephus (compiler: GNU GCC Compiler) ===|
D:\work\cs\c++\datastruct\Exercise\Josephus\main.cpp||In function 'int main()':|
D:\work\cs\c++\datastruct\Exercise\Josephus\main.cpp|34|error: converting to execution character set: Illegal byte sequence|
D:\work\cs\c++\datastruct\Exercise\Josephus\main.cpp|36|error: converting to execution character set: Illegal byte sequence|
D:\work\cs\c++\datastruct\Exercise\Josephus\main.cpp|38|error: converting to execution character set: Illegal byte sequence|
D:\work\cs\c++\datastruct\Exercise\Josephus\main.cpp|40|error: converting to execution character set: Illegal byte sequence|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

 

 

设置办法:

文件编码:
Setting -> Editor ->General settings -> Encoding settings

此处默认Windows-936即gbk

编译编码:
Setting -> Compiler -> Global compiler settings -> other compiler options

在框中输入:
    -finput-charset=GBK
    -fexec-charset=GBK

 

如果需要跨平台, 建议都设置为 UTF-8, 即

-finput-charset=UTF-8
-fexec-charset=UTF-8


References:

这里设置办法参考自

http://www.cnblogs.com/thingk/p/4224186.html

 

2

CodeBlocks中关于 algorithm, vector 等头文件的存放目录

Posted by haifeng on 2018-03-30 23:04:18 last update 2018-03-30 23:04:18 | Answers (0) | 收藏

 

C:\Program Files (x86)\CodeBlocks\MinGW\lib\gcc\mingw32\4.9.2\include\c++

3

undefined reference to wxTaskBarIcon

Posted by haifeng on 2016-09-29 21:44:13 last update 2016-09-29 21:44:13 | Answers (0) | 收藏

编译时如果出现

undefined reference to wxTaskBarIcon::wxTaskBarIcon

的错误提示,

则需要在 codeblocks 的项目编译属性(build option)的 link 设置页面(link setting)中添加 libwxmsw30u_adv.a

4

Codeblocks 命令行启动

Posted by haifeng on 2015-03-11 08:47:12 last update 2015-03-11 09:26:38 | Answers (0) | 收藏

个性化

使用 --personality=myuser 来调用 CodeBlocks, 配置信息将保存到 myuser.conf 中. 如果该文件不存在, 系统将自动创建它.

如果传递参数 ask, 即 --personality=ask, 将会显示当前所有的配置列表, 由用户选择某个配置文件并启动 CodeBlocks.

C:\Program Files\CodeBlocks>codeblocks.exe --personality=ask

 

 


References:

 

http://blog.csdn.net/drbinzhao/article/details/8064049


Search

New posted more ...