c++ - 如何解决linux中GLFW应用静态编译的问题?
问题描述
这是我的应用程序编译命令。
# inside file grun.sh
g++ $1 -pthread -static -o glapp -lglut -lGLU -lGL -lglfw && ./glapp $2 $3 $4 $5 $6 $7 $8 && rm ./glapp
使用我的应用程序文件运行上述命令时。
$ grun Myapplication.cpp
得到错误
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lglfw
collect2: error: ld returned 1 exit status
虽然没有选项它运行良好-static
,但我想让我的应用程序静态编译,请帮助我该怎么做?
解决方案
推荐阅读
- java - 基于 tomcat 的 API 访问的特殊延迟时间
- javascript - 将新项目从字段推送到对象
- azure-cosmosdb - DocumentClient CreateDocumentQuery 或 ReadDocumentAsync 都抛出异常,因为 id 未找到,而 id 存在
- c++ - 如何定义嵌套模板
- python - 将行移动到另一个数据框时如何加速 Pandas 包含
- email - 在公共 Mailinator 收件箱中查看电子邮件标题
- r - 使用 r data.table 的行值与组中行总和的比率
- php - 为什么他们使用 array(&$this 'fill') 而只是 'fill' 作为 wordpress 函数的回调参数?
- mongodb - 如何在没有备份的情况下恢复 mongo db
- linux - 编写参数日志、标准输入和标准输出的包装脚本