【网站程序源码】【主力筹码源码】【许愿网源码】freeglut源码

时间:2024-11-23 11:28:40 来源:nars溯源码 编辑:森林火灾风险预测源码

1.ubuntu上G2O库的安装
2.Ubuntu如何安装wine命令
3.ubuntu安装wine的源码时候出现不能解决依赖关系。怎么解决
4.如何在Linux下使用OpenGL+ C++开发

freeglut源码

ubuntu上G2O库的安装

       ä¸€ã€ä»€ä¹ˆæ˜¯G2O库?有什么用?

        g2o 是一个图优化库。常常在SLAM 中被使用。

        图优化本质上仍然是非线性优化。只不过利用图的方式表现出来,使问题 可视化 ,然后可以根据可视化的结果来更好的调整优化过程。

        图  æ˜¯ä¸€ç§æ•°æ®ç»“构。在图优化中,用 顶点  (vertex) 表示 优化变量 ,用 è¾¹  (edge) 表示 误差项 。于是,对于任意一个上述形式的非线性最小二乘问题,都可以构建一个与之对应的图。

        在视觉SLAM 十四讲中,常用的后端优化库有两个:g2o 和ceres。ceres 是google 的一个优化库,文档详尽且友好,就不再赘述了。但对于g2o,除了源码,官方用doxygen 生成的帮助文档,就只有论文  g2o: A general framework for graph optimization  å’Œè¿™ç¯‡github 的 文档 。

        二、如何安装G2O库?有哪些依赖项?在安装和使用的过程中,会遇到哪些问题,以及如何解决?

        1安装步骤

        git clone .archive.ubuntu.com/ubuntu bionic/universe amd freeglut3 amd 2.8.1-3

        connetciton failed [IP:... ]

        Err:2 .archive.ubuntu.com/ubuntu bionic/universe amd freeglut3-dev amd 2.8.1-3

        connetciton failed [IP:... ]

        E:Failed to fetch  .archive.ubuntu.com/ubuntu/pool/universe/f/freeglut/freeglut3_2.8.1-3_amd.deb connection failed  [IP:... ]

        E:Failed to fetch  .archive.ubuntu.com/ubuntu/pool/universe/f/freeglut/freeglut3-dev_2.8.1-3_amd.deb connection failed  [IP:... ]

        E:Unable to fetch some archives,源码 maybe run apt-get install libglut-dev

        最终 解决方案 ,  æ›´æ¢ sources.list 阿里源 清华镜像。

        apt-get update

        apt-get upgrade

       3在使用g2o时,编译用到了g2o库的project,遇到报错error: ‘index_sequence’ is not a member of 'std'

        解决方案 ,修改project的CMakeLists.txt添加:set(CMAKE_CXX_STANDARD )

       å‚考链接:

        Ubuntu. 更换 sources.list 阿里源 清华镜像 – 小固件 (atmcu.com)

        (条消息) 视觉SLAM十四讲 报错 error: ‘index_sequence’ is not a member of ‘std‘_CSSDCC的博客-CSDN博客

        (条消息) 视觉SLAM十四讲 报错 error: ‘index_sequence’ is not a member of ‘std‘_CSSDCC的博客-CSDN博客

Ubuntu如何安装wine命令

       方法一:

       Wine (“Wine Is Not an Emulator” 的首字母缩写)是一个能够在多种 POSIX-compliant 操作系统(诸如 Linux,Mac OSX 及 BSD 等)上运行 Windows 应用的源码兼容层。 Wine 不是源码网站程序源码像虚拟机或者模拟器一样模仿内部的 Windows 逻辑,而是源码将 Windows API 调用翻译成为动态的 POSIX 调用,免除了性能和其他一些行为的源码主力筹码源码内存占用,让你能够干净地集合 Windows 应用到你的源码桌面。

       下面跟大家分享如何在Ubuntu .上安装Wine

       1.添加PPA

       sudo add-apt-repository ppa:ubuntu-wine/ppa

       2.更新列表

       sudo apt-get update

       3.安装Wine

       sudo apt-get install wine1.7 winetricks

       为了避免错误大家可以使用以下命令

       sudo apt-get update

       方法二:

       打开终端执行一下命令,源码在安装过程中会提示你是源码否同意协议,点击Enter:

       sudo add-apt-repository ppa:ubuntu-wine/ppa

       sudo apt-get update sudo apt-get install wine1.5

Ubuntu . 编译安装Wine 1.7

       先安装依赖的源码库:

       sudo apt-get install flex bison qt4-qmake

       apt-get install libfreetype6-dev

       apt-get install libjpeg-dev libpng-dev libxslt-dev libxml2-dev

       apt-get install libxrender-dev

       sudo apt-get install libgl1-mesa-dev

       sudo apt-get install libglu1-mesa-dev

       sudo apt-get install freeglut3-dev

       apt-get install prelink

       apt-get install libasound2-dev

       下载最新的源代码:

       mands

       config.status: executing dlls/gdi/dibdrv commands

       config.status: executing dlls/gdi/enhmfdrv commands

       config.status: executing dlls/gdi/mfdrv commands

       config.status: executing dlls/kernel/nls commands

       config.status: executing dlls/user/resources commands

       config.status: executing dlls/wineps.drv/data commands

       config.status: executing include/wine commands

       config.status: executing Makefile commands

       configure: libxcursor development files not found, the Xcursor extension won't be supported.

       configure: libxi development files not found, the Xinput extension won't be supported.

       configure: libxrandr development files not found, XRandr won't be supported.

       configure: libxinerama development files not found, multi-monitor setups won't be supported.

       configure: libxcomposite development files not found, Xcomposite won't be supported.

       configure: libOSMesa development files not found (or too old), OpenGL rendering in bitmaps won't be supported.

       configure: OpenCL development files not found, OpenCL won't be supported.

       configure: libdbus development files not found, no dynamic device support.

       configure: libgnutls development files not found, no schannel support.

       configure: lib(n)curses development files not found, curses won't be supported.

       configure: libsane development files not found, scanners won't be supported.

       configure: libv4l development files not found.

       configure: libgphoto2 development files not found, digital cameras won't be supported.

       configure: libgphoto2_port development files not found, digital cameras won't be auto-detected.

       configure: liblcms2 development files not found, Color Management won't be supported.

       configure: gstreamer-0. base plugins development files not found, gstreamer support disabled

       configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.

       configure: libcapi development files not found, ISDN won't be supported.

       configure: libcups development files not found, CUPS won't be supported.

       configure: fontconfig development files not found, fontconfig won't be supported.

       configure: libgsm development files not found, gsm . codec won't be supported.

       configure: libtiff development files not found, TIFF won't be supported.

       configure: libmpg development files not found (or too old), mp3 codec won't be supported.

       configure: libopenal development files not found (or too old), OpenAL won't be supported.

       configure: libldap (OpenLDAP) development files not found, LDAP won't be supported.

       configure: Finished. Do 'make' to compile Wine.

       现在可以编译了。运行make,源码等待吧。源码一个小时候编译完成。源码许愿网源码然后运行make install

       或者可以以非root用户的源码身份进入tools目录,运行:

       ./wineinstall

       它会自动编译并安装程序,源码中间会提示输入管理员密码。网站源码扫描

       安装到了/usr/local/bin目录下

       运行命令检查版本:

       ine --version

       wine-1.7.4

       然后创建一个wine链接,否则很多程序不能用, 比如winecfg。

       sudo ln -s /usr/local/bin/wine /usr/local/bin/wine

ubuntu安装wine的遥控精灵源码时候出现不能解决依赖关系。怎么解决

       去下源代码自己编译呗,那还是1.4的,你可以去官网下个1.7滴~~

       先安装依赖的库:

       sudo apt-get install flex bison qt4-qmake

       sudo apt-get install libfreetype6-dev

       sudo apt-get install libjpeg-dev libpng-dev libxslt-dev libxml2-dev

       sudo apt-get install libxrender-dev

       sudo apt-get install libgl1-mesa-dev

       sudo apt-get install libglu1-mesa-dev

       sudo apt-get install freeglut3-dev

       sudo apt-get install prelink

       sudo apt-get install libasound2-dev

       然后下载源代码进入解包目录:

       ./configure

       make //编译大约需要一个小时~~

       sudo make install

       安装完后中文显示乱码,需要下载字体解决,不会就谷歌~~

如何在Linux下使用OpenGL+ C++开发

       å‰ææ˜¯ï¼š

       1.配置好了Ubuntu下的c++环境,gcc以及g++可用。

       2.使用eclipse for c+做OpenGL开发

       ã€€ã€€æ­¥éª¤ä¸€ï¼š

       åœ¨ubuntu终端下运行以下命令,安装opengl所需要的库文件

       $ sudo apt-get install build-essential

       $ sudo apt-get install freeglut3-dev

       ã€€ã€€æ­¥éª¤äºŒï¼š

       ã€€ã€€è¿è¡Œä¸€ä¸‹opengl实例,测试配置的环境是否安装成功

       åœ¨eclipse下新建一个工程文件,假设我们命名为Test,在工程Test里面新建一个C++源代码文件,这里我们把它命名为main.cpp,在main.cpp文件中打入一下代码

#include <GL/glut.h>

       ã€€ã€€void init();

       void display();

       ã€€ã€€int main(int argc, char* argv[])

       {

             glutInit(&argc, argv);

             glutInitDisplayMode(GLUT_RGB |GLUT_SINGLE);

             glutInitWindowPosition(0, 0);

             glutInitWindowSize(, );

       ã€€ã€€glutCreateWindow("OpenGL 3D View");

       ã€€ã€€init();

             glutDisplayFunc(display);

       ã€€ã€€glutMainLoop();

             return 0;

       }

       ã€€ã€€void init()

       {

             glClearColor(0.0, 0.0, 0.0, 0.0);

             glMatrixMode(GL_PROJECTION);

             glOrtho(-5, 5, -5, 5, 5, );

             glMatrixMode(GL_MODELVIEW);

             gluLookAt(0, 0, , 0, 0, 0, 0, 1, 0);

       }

       ã€€ã€€void display()

       {

             glClear(GL_COLOR_BUFFER_BIT);

       ã€€ã€€glColor3f(1.0, 0, 0);

             glutWireTeapot(3);

       ã€€ã€€glFlush();

       }

       å³å‡»å·¥ç¨‹æ–‡ä»¶å

       Test->点击属性(Properties)->C/C++Bulid->Settings->GCC C++Linker->Libraries,

       åœ¨è¿™ä¸ªçª—口中添加几个个库,

       åˆ†åˆ«ä¸ºGLU,glut,GL,

       ç‚¹å‡»OK。

       å¦‚果还想使用opencv,

       åœ¨è¿™é‡Œè¿˜åŠ å…¥cv,cxcore,highgui等库文件,

       æ ¹æ®è‡ªå·±çš„需要来定

       åŒæ—¶åœ¨GCC C++ Compiler->Includes下的incudepath中添加路径/usr/include/GL

       å¦‚果还想使用opencv中的库,那么加入opencv的路径,一般是/usr/include/opencv

       ã€€ã€€è¿è¡Œä»¥ä¸Šç¨‹åºï¼Œä¼šæ˜¾ç¤ºä¸€ä¸ªèŒ¶å£¶å½¢çŠ¶çš„opengl运行结果

copyright © 2016 powered by 皮皮网   sitemap