linux下Qt问题cannot find -lGL collect2: error: ld returned 1 exit status

fedora下解决

  1. yum groupinstall "Development Tools"
  2. yum install mesa-libGL-devel

ubuntu下解决

sudo apt-get install libglu1-mesa-dev -y

时间: 2024-08-08 04:50:46

linux下Qt问题cannot find -lGL collect2: error: ld returned 1 exit status的相关文章

error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

Windows服务器Azure云编译安装MariaDB教程 www.111cn.net 编辑:future 来源:转载 安装MariaDB数据库最多用于linux系统中了,下文给各位介绍在Windows服务器Azure云编译安装MariaDB教程,希望本文能帮助到各位. 试用1元Windows Azure,带宽都是杠杠的.下面演示下Windows Azure下编译安装LNMP环境,系统环境是Ubuntu 14.04 TLS版 软件版本: 数据库:mariadb-10.0.13 Stable PH

php7 编译 collect2: error: ld returned 1 exit status

/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_strdup'/usr/bin/ld:note: 'ber_strdup' is defined in DSO /lib64/liblber-2.4.so.2 so try adding it to the linker command line/lib64/liblber-2.4.so.2:could not read symbols: Invalid

自定义库引用时编译出错“collect2: error: ld returned 1 exit status”

想必很多人都遇到过这样的事情,需要写一个共享库,这个库又不能让所有的人都了解里面是怎么实现的,所以只能提供一个库出来供项目使用,可能是处于保密.核心业务的需要,这些都能够理解.笔者也写了一个简单的东西测试了一下,里面还是有不少东西. "collect2: error: ld returned 1 exit status"首先就遇到了这个问题.查了一下,这种错误网上说法也一大堆,起作用的还不多.在android系统里面加的共享库,需要加"namespace android &q

gcc/g++ 编译时出现:“对’xxxx’未定义的引用,collect2: error: ld returned 1 exit status” 的错误

出现的问题: 在使用 make 编译实现一个程序时,出现了下面的错误.查看程序源文件所在的目录时发现程序已经完成了编译,并生成了 list_repo.o 的文件,说明是在程序链接生成可执行文件时发生了问题. storages/local.o:在函数‘LocalStorage::init(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,

QT编译出现ld.exe: cannot open output file debug\nh_03testCallPy.exe: Permission denied collect2.exe: error: ld returned 1 exit status

D:/Qt/Qt5.9.0/Tools/mingw530_32/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot open output file debug\nh_03testCallPy.exe: Permission denied collect2.exe: error: ld returned 1 exit status 原因目前可能有如下: 1.程序已经在运行,进入

linux下运行strlwr函数出错:ld returned 1 exit status

运行strlwr函数时报错,源程序如下: #include<stdio.h> #include<string.h> void main() { char s[10]={"CHINA"}; printf("%s\n",strlwr(s)); return 0; } 报错内容如下: eg6527a.c: In function 'main': eg6527a.c:8:2: warning: 'return' with a value, in fu

linux下执行strlwr函数出错:ld returned 1 exit status

执行strlwr函数时报错.源程序例如以下: #include<stdio.h> #include<string.h> void main() { char s[10]={"CHINA"}; printf("%s\n",strlwr(s)); return 0; } 报错内容例如以下: eg6527a.c: In function 'main': eg6527a.c:8:2: warning: 'return' with a value, i

QT错误之——collect2:ld returned 1 exit status

pcDuino3下支持mmc启动,官方的Uboot是采用SPL框架实现的,因为内部的SRAM空间达到32K,我们完全可以在这32K空间内编写一个完整可用小巧的bootloader来完成引导Linux kernel的目的. 我们首先介绍下SPL框架,可以先看下<GNU ARM汇编--(十八)u-boot-采用nand_spl方式的启动方法>和<GNU ARM汇编--(十九)u-boot-nand-spl启动过程分析>,NAND_SPL也算是SPL框架下的一种模式. 当使用Nand f

undefined reference to `pthread_create&#39; collect2: ld returned 1 exit status

Linux下编译多线程程序遇到错误: undefined reference to `pthread_create' collect2: ld returned 1 exit status 原因是系统无法找到pthread_create函数.也就是说编译器在link得时候找不到其中的一个使用库的函数. 解决办法如下: For Linux the correct command is: gcc -pthread xxx.c In general, libraries should follow s