本文介绍了代码:从bash构建块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 我正在使用Code :: Blocks开发C ++应用程序。 我的程序有一些依赖性,并且必须在Linux和Windows下运行,这就是为什么我使用Code :: Blocks的原因。I'm developing a C++ application in Code::Blocks.My program has a few dependencies and has to run under Linux and Windows, this is whyI use Code::Blocks.现在,我希望包括Travis CI来测试构建。 在没有X11的Travis服务器上,我将无法运行Code :: Blocks。如何在没有Code :: Blocks的情况下构建项目。 (是否可以从 .cbp 文件中创建 makefile?Now I'd like to include Travis CI for testing the builds.On the Travis server, where I have no X11, I won't be able to run Code::Blocks. How can I build my project without Code::Blocks. (Is there a possibility to create "a Makefile" out of the .cbp-file?此页面(代码:: Blocks Wiki)提到有一个-build 标志,但是您需要Code :: Blocks& X11。是否有没有X11的服务器方式?This page (Code::Blocks Wiki) mentions there is a --build flag, but you need Code::Blocks & X11. Is there a server way without X11?推荐答案我使用了 cbp2make (C: :B论坛入口)。非常简单I used cbp2make (C::B Forum entry).It is quite simplecbp2make -in project.cbp -out Makefile它立即生效,即使的配置比简单的命令行更复杂and it worked immediatly, even with a more complex configurationthan a simple command line project in Code::Blocks.它还会生成与Code :: Blocks相同的构建目标,例如 make Release 会起作用。It also generates the same build targets as in Code::Blocks. For example make Release would work. debian软件包列表仅显示了一些依赖性,因此不需要X11。The debian package list shows only a few dependencies, so X11 is not required. 这篇关于代码:从bash构建块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-08 15:37