【c – Ubuntu中的Allegro:对“al_install_system”的未定义引用】教程文章相关的互联网学习教程文章

c-xubuntu中对boost :: program_options的未定义引用【代码】

我有这个档案#include <boost/program_options.hpp> namespace po = boost::program_options;#include <iostream> using namespace std;int main(int ac, char* av[]) {try {po::options_description desc("Allowed options");desc.add_options()("help", "produce help message");}catch(exception& e) {cerr << "error: " << e.what() << "\n";return 1;}catch(...) {cerr << "Exception of unknown type!\n";}return 0; }现在,我...

linux – 在Windows上的Ubuntu bash上找不到“引用控制台的文件描述符”

我是新来的,这是我的第一篇文章. 我在Windows上的Ubuntu上遇到了Bash问题.如果我在Mac终端上输入“open(filename)”,它会用正确的程序打开文件,但如果我尝试在Windows bash上使用它,它会说:“找不到引用控制台的文件描述符”. 我也尝试过xdg-open和gnome-open但它们都没有用.有人可以解释如何解决问题以及open命令如何工作?提前致谢!解决方法:而不是打开你可以使用xdg-open做同样的事情,独立于应用程序,即pdf,图像等.它将打开一...

c – Ubuntu中的Allegro:对“al_install_system”的未定义引用【代码】

我今天尝试安装Allegro库.我在C中有相同的经验,但似乎我没有做过这样的事情.我从源代码编译了Allegro 5.0并将其放在/usr/lib/gcc/i486-linux-gnu/4.4/include/allegro5中.但是当我尝试编译我的代码时,会出现这种情况:> g++ test2.cc -o test2 /home/chris/Desktop/c++/test2/.objs/main.o||In function `main':| main.cpp:(.text+0x22)||undefined reference to `al_install_system'| main.cpp:(.text+0x3e)||undefined reference...

c将ubuntu下的boost库与cmake连接:未定义引用`boost :: iostreams :: zlib :: okay’【代码】

我有boost :: iostreams的问题.我想只在一个函数中使用它们.唯一的问题是这一行:in.push(boost::iostreams::gzip_decompressor());Boost用于程序的其他部分,没有任何问题或编译错误.但是,如果我使用此行,我会收到编译错误:undefined reference to `boost::iostreams::zlib::okay'它包括这样:#include <boost/iostreams/filter/gzip.hpp>的CMakeLists.txtadd_library(backend... some files )find_package(Boost COMPONENTS syst...