网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
02月03日漏签0天
codeblocks吧 关注:18,901贴子:46,638
  • 看贴

  • 图片

  • 吧主推荐

  • 游戏

  • 1 2 下一页 尾页
  • 20回复贴,共2页
  • ,跳到 页  
<<返回codeblocks吧
>0< 加载中...

有人尝试过在windows平台下编译codeblocks源代码吗

  • 只看楼主
  • 收藏

  • 回复
  • 石水2
  • 华丽飘过
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
这里有个老外写到详细步骤,但是版本貌似比较老了,这篇文章大概是他在2011-02-28写的
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows
代码我已经下好了,用svn更新的,codeblocks也装好了,但是还不清楚怎么编译这个codeblocks的源代码,希望有过来人能够指点一二。

图1 CodeBlocks源代码


  • 石水2
  • 华丽飘过
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
自己顶一下


2026-02-03 02:25:57
广告
不感兴趣
开通SVIP免广告
  • 石水2
  • 华丽飘过
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
再顶


  • 石水2
  • 华丽飘过
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
CodeBlocks源代码里面经常看到这类以wx大头的库文件。
就像这样的:
#include <wx/filename.h>
#include <wx/msgdlg.h>
#include <wx/stream.h>
#include <wx/wfstream.h>
#include <wx/txtstrm.h>
#include <wx/regex.h> // used in QUICK hack at line 574
可是我搜索整个工程都找不到这些头文件。。。


  • 石水2
  • 华丽飘过
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
我觉得看下工程的“build options”,尤其是其中的“Search directories”,对编译源代码这个问题会有所帮助。

图1 CodeBlocks_wx29.cbp的“build options”


  • 石水2
  • 华丽飘过
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
sdk\wxscintilla\include
include\tinyxml
在工程文件里已经有了
关键问题是
$(#WX29.include)
$(#WX29.lib)\gcc_dll$(WX_CFG)\msw$(WX_SUFFIX)
代表了什么
已知的变量有WX_SUFFIX,WX_VERSION,WX_CFG(这个算是知道吗,没有值啊)

图2 CodeBlocks_wx29.cbp的“build options”里的“Custom variables”


  • 石水2
  • 华丽飘过
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
还有个需要注意的问题是,双击打开CodeBlocks_wx29.cbp时会让我们设置3个变量psdk,wx,wx29

图3 CodeBlocks_wx29.cbp要求设置的3个全局变量


  • 石水2
  • 华丽飘过
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
我预感把这些变量都填满了的时候,也就是编译通过的时候。啊哈哈哈。。。


2026-02-03 02:19:57
广告
不感兴趣
开通SVIP免广告
  • 石水2
  • 华丽飘过
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
编译wxWidgets库的时候,那个老外写的环境变量有问题,至少在我的电脑上出了问题,一直提示“No such file or directory”(出现这个问题的人貌似还挺多的!!)。
而实际上只要把“%PATH%”加到他环境变量上就可以了。
我的是这样的:
set path=%PATH%;"C:\Program Files\CodeBlocks\MinGW\bin";"C:\Program Files\CodeBlocks\MinGW\mingw32\bin";"C:\Program Files\CodeBlocks\MinGW\libexec\gcc\mingw32\4.7.1"
(%PATH% 放到后面会不会更好,以减小干扰,还没有尝试)
已经一个小时过去了,wxWidgets库编译正常,撒花!~


  • 石水2
  • 华丽飘过
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
遇到问题还是官方比较靠谱啊msdn,manual,datasheet...


  • 乎奂
  • 亮了瞎了
    9
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
GCC WxWidgets都编译过 CodeBlock没有编译过


  • 乎奂
  • 亮了瞎了
    9
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
These notes are for developers wishing to build Code::Blocks from source.
The only external library needed to build Code::Blocks is wxWidgets.You must compile wxWidgets as a monolithic DLL. Refer to the build documentation in the wxWidgets sources on how to do it.
Win32 build instructions:-------------------------To build these sources, you must have a recent Code::Blocks nightly build installed (http://www.codeblocks.org/nightly).Open the src/CodeBlocks.cbp and hit "Build". This should build the IDE and the core plugins.Close the project now and open src/ContribPlugins.workspace. Hit "Build". This builds all the contributed plugins.
When you 're done with the above, close Code::Blocks and run src/update.bat. This creates a working environment for Code::Blocks, by copying needed files under folders "devel" and "output".
Unix build instructions:------------------------You need a working autotools environment (autoconf, automake, libtool, make, etc).In a terminal, go to the top level folder.If you fetched the sources from SVN, you need to bootstrap the program first. So type:
./bootstrap
This will adapt the project's configuration file to your environment. This only needs to be done once: the first time you checkout the SVN version.
After this, type the following:
./configure --with-contrib-plugins=allmakemake install
For the last step you must be root.That's it.
or:
./configure --prefix=/usr --with-contrib-plugins=all,-helpmakemake install
"all" compiles all contrib plugins"all,-help" compiles all contrib plugins except the help pluginBy default, no contrib plugins are compiledPlugin names are: AutoVersioning, BrowseTracker,byogames,Cccc,CppCheck,cbkoders,codesnippets, codestat, copystrings, Cscope, DoxyBlocks, dragscroll, EditorConfig, EditorTweaks, envvars, FileManager, headerfixup, help, hexeditor, incsearch, keybinder, libfinder, MouseSap, NassiShneiderman, profiler, regex, ReopenEditor, exporter, symtab, ThreadSearch, ToolsPlus, Valgrind, wxsmith, wxsmithcontrib,wxsmithaui
Working on Code::Blocks sources from within Code::Blocks!---------------------------------------------------------The following apply for all platforms where you have Code::Blocks installed and working.
These two folders will contain the same files and directory structure and you can use the IDE from either of these two directories. This structure has been created so that you can work in Code::Blocks while editing Code::Blocks' sources ;).Basically, you 'll be using the "output/CodeBlocks.exe" executable. Code::Blocks' project settings are such that all output goes under "devel". So you can edit Code::Blocks' sources inside Code::Blocks and, when pressing "Run", it will run the "devel/CodeBlocks.exe" executable ;). This way, you can't ruin the main executable you 're using (under "output"). When your changes satisfy you and all works well, quit Code::Blocks, run "make update" from command line and re-launch "output/CodeBlocks.exe". You 'll be working on your brand new IDE!


  • 逸少念浮伽蓝寺
  • 1L喂熊
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
可以给我发份源代码吗 谢谢


  • Edison_Canton
  • 亮了瞎了
    9
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
我的绿色便携版中专门做了一个 CodeBlocks svn 编译配置,在绿色便携版的 tools 目录中。
CodeBlocks 默认的编译器配置会显示一大堆 log,导致编译速度显著下降( CB 的人有提到过,但是有没有修正我没注意到)。


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 1 2 下一页 尾页
  • 20回复贴,共2页
  • ,跳到 页  
<<返回codeblocks吧
分享到:
©2026 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示