- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
之前的stackoverflow线程位于here .我的问题发生了很大变化,以至于我认为应该创建一个新线程。我正在使用 CentOS8
我正在安装 a tool called wave-gui并且度过了一段真正的艰难时期(正如您从最后一个线程中看到的那样)。我当前的问题是当我使用 make 命令时找不到名为 cg_config.h 的文件(我也收到错误 1 和 2)。让我走到这一步的所有故障排除步骤都位于前面的 thread 中。 .
我已经复制粘贴了下面 make 命令的输出,以及下面输出中提到的“主”目录的内容。
-- Creating program 'wave-gui' with sources:
-- main.cpp
-- app.cpp
-- core.cpp
-- ui.cpp
-- data.cpp
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.11)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ellingtonj/wave-gui
Scanning dependencies of target wave-gui
[ 16%] Building CXX object CMakeFiles/wave-gui.dir/main.o
/home/ellingtonj/wave-gui/main/main.cpp:10:10: fatal error: cg_config.h: No such file or directory
#include "cg_config.h"
^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/wave-gui.dir/build.make:63: CMakeFiles/wave-gui.dir/main.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/wave-gui.dir/all] Error 2
make: *** [makefile:130: all] Error 2
app.cpp CMakeLists.txt core.h data.h ui.cpp
app.h core.cpp data.cpp main.cpp ui.h
编辑1:从工具中完全删除目录并重新克隆它并运行这些步骤。出现新错误。这次它找不到 SDL2。 (耶进步!)
mkdir -p build && cd build && cmake .. && make
-- The C compiler identification is GNU 8.3.1
-- The CXX compiler identification is GNU 8.3.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.4.2")
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/FindSDL2.cmake:173 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:16 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/ellingtonj/wave-gui/build/CMakeFiles/CMakeOutput.log".
See also "/home/ellingtonj/wave-gui/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:2: all] Error 1
SDL2 网站说只需使用“sudo yum install SDL2”。当我使用此命令时,我得到以下输出:
Last metadata expiration check: 1:25:41 ago on Mon 26 Oct 2020 09:54:58 AM EDT.
No match for argument: SDL2
Error: Unable to find a match: SDL2
使用相同的命令,但使用 SDL2-devel 会得到类似的输出。
Last metadata expiration check: 1:26:51 ago on Mon 26 Oct 2020 09:51:55 AM EDT.
========================================= Summary Matched: SDL2 =========================================
baresip-sdl.x86_64 : SDL2 video output driver for baresip
[ellingtonj@localhost ~]$ sudo yum install SDL2-devel
Last metadata expiration check: 1:24:08 ago on Mon 26 Oct 2020 09:54:58 AM EDT.
No match for argument: SDL2-devel
Error: Unable to find a match: SDL2-devel
[ellingtonj@localhost ~]$ yum search SDL2
Last metadata expiration check: 1:28:11 ago on Mon 26 Oct 2020 09:51:55 AM EDT.
========================================= Summary Matched: SDL2 =========================================
baresip-sdl.x86_64 : SDL2 video output driver for baresip
然后我尝试了“sudo yum install baresip-sdl.x86_64”,它给了我这个输出:
Last metadata expiration check: 1:25:25 ago on Mon 26 Oct 2020 09:54:58 AM EDT.
Error:
Problem: conflicting requests
- nothing provides libSDL2-2.0.so.0()(64bit) needed by baresip-sdl-1.0.0-1.el8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
只是为了好玩,我输入“sudo yum install libSDL-2.0.so.0.so.0”并得到另一个“参数不匹配”
mkdir -p build && cd build && cmake .. && make
-- Checking for one of the modules 'glfw3'
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:640 (message):
None of the required 'glfw3' found
Call Stack (most recent call first):
CMakeLists.txt:17 (pkg_search_module)
-- FFTW support enabled.
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY
OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindOpenGL.cmake:395 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
external/imgui/CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/ellingtonj/wave-gui/build/CMakeFiles/CMakeOutput.log".
See also "/home/ellingtonj/wave-gui/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:2: all] Error 1
我现在正在考虑安装 OpenGL,但正如在上一个线程中所指出的那样,我现在正处于我的头上。我还补充说(在几个人的要求下)我正在使用 CentOS8。
mkdir -p build && cd build && cmake .. && make
-- Checking for one of the modules 'glfw3'
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:640 (message):
None of the required 'glfw3' found
Call Stack (most recent call first):
CMakeLists.txt:17 (pkg_search_module)
-- FFTW support enabled.
CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenGL.cmake:270 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
FindOpenGL found both a legacy GL library:
OPENGL_gl_LIBRARY: /usr/lib64/libGL.so
and GLVND libraries for OpenGL and GLX:
OPENGL_opengl_LIBRARY: /usr/lib64/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib64/libGLX.so
OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
external/imgui/CMakeLists.txt:4 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found OpenGL: /usr/lib64/libOpenGL.so
-- Checking for one of the modules 'glfw3'
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:640 (message):
None of the required 'glfw3' found
Call Stack (most recent call first):
external/imgui/CMakeLists.txt:12 (pkg_search_module)
-- Creating program 'wave-gui' with sources:
-- main.cpp
-- app.cpp
-- core.cpp
-- ui.cpp
-- data.cpp
-- Configuring incomplete, errors occurred!
See also "/home/ellingtonj/wave-gui/build/CMakeFiles/CMakeOutput.log".
See also "/home/ellingtonj/wave-gui/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:2: all] Error 1
当我使用命令“sudo yum install glfw”时,我得到以下输出:
Last metadata expiration check: 0:07:49 ago on Mon 26 Oct 2020 12:24:38 PM EDT.
Package glfw-1:3.3-2.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
编辑 4:安装 glfw-devel 并尝试再次运行 make 命令。这次它比以往任何时候都更进一步(再次!进步!!)。虽然仍然出现错误。
mkdir -p build && cd build && cmake .. && make
-- Checking for one of the modules 'glfw3'
-- FFTW support enabled.
CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenGL.cmake:270 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
FindOpenGL found both a legacy GL library:
OPENGL_gl_LIBRARY: /usr/lib64/libGL.so
and GLVND libraries for OpenGL and GLX:
OPENGL_opengl_LIBRARY: /usr/lib64/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib64/libGLX.so
OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
external/imgui/CMakeLists.txt:4 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Creating program 'wave-gui' with sources:
-- main.cpp
-- app.cpp
-- core.cpp
-- ui.cpp
-- data.cpp
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ellingtonj/wave-gui/build
make[1]: Entering directory '/home/ellingtonj/wave-gui/build'
make[2]: Entering directory '/home/ellingtonj/wave-gui/build'
make[3]: Entering directory '/home/ellingtonj/wave-gui/build'
Scanning dependencies of target cg_core
make[3]: Leaving directory '/home/ellingtonj/wave-gui/build'
make[3]: Entering directory '/home/ellingtonj/wave-gui/build'
[ 4%] Building CXX object src/CMakeFiles/cg_core.dir/cg_config.cpp.o
[ 8%] Building CXX object src/CMakeFiles/cg_core.dir/cg_logger.cpp.o
[ 12%] Building CXX object src/CMakeFiles/cg_core.dir/cg_glfw3.cpp.o
[ 16%] Building CXX object src/CMakeFiles/cg_core.dir/cg_keyboard.cpp.o
[ 20%] Building CXX object src/CMakeFiles/cg_core.dir/cg_mouse.cpp.o
[ 25%] Building CXX object src/CMakeFiles/cg_core.dir/cg_timer.cpp.o
[ 29%] Building CXX object src/CMakeFiles/cg_core.dir/cg_window.cpp.o
[ 33%] Building CXX object src/CMakeFiles/cg_core.dir/cg_window2d.cpp.o
[ 37%] Linking CXX static library libcg_core.a
make[3]: Leaving directory '/home/ellingtonj/wave-gui/build'
[ 37%] Built target cg_core
make[3]: Entering directory '/home/ellingtonj/wave-gui/build'
Scanning dependencies of target ImGui
make[3]: Leaving directory '/home/ellingtonj/wave-gui/build'
make[3]: Entering directory '/home/ellingtonj/wave-gui/build'
[ 41%] Building CXX object external/imgui/CMakeFiles/ImGui.dir/imgui.cpp.o
[ 45%] Building CXX object external/imgui/CMakeFiles/ImGui.dir/imgui_demo.cpp.o
[ 50%] Building CXX object external/imgui/CMakeFiles/ImGui.dir/imgui_draw.cpp.o
[ 54%] Building CXX object external/imgui/CMakeFiles/ImGui.dir/imgui_user.cpp.o
[ 58%] Building CXX object external/imgui/CMakeFiles/ImGui.dir/imgui_widgets.cpp.o
[ 62%] Building CXX object external/imgui/CMakeFiles/ImGui.dir/examples/imgui_impl_glfw.cpp.o
[ 66%] Building CXX object external/imgui/CMakeFiles/ImGui.dir/examples/imgui_impl_opengl3.cpp.o
[ 70%] Building C object external/imgui/CMakeFiles/ImGui.dir/examples/libs/gl3w/GL/gl3w.c.o
[ 75%] Linking CXX shared library libImGui.so
/usr/bin/ld: cannot find -lXrandr
/usr/bin/ld: cannot find -lXi
/usr/bin/ld: cannot find -lXinerama
/usr/bin/ld: cannot find -lXxf86vm
/usr/bin/ld: cannot find -lXcursor
collect2: error: ld returned 1 exit status
make[3]: *** [external/imgui/CMakeFiles/ImGui.dir/build.make:191: external/imgui/libImGui.so] Error 1
make[3]: Leaving directory '/home/ellingtonj/wave-gui/build'
make[2]: *** [CMakeFiles/Makefile2:159: external/imgui/CMakeFiles/ImGui.dir/all] Error 2
make[2]: Leaving directory '/home/ellingtonj/wave-gui/build'
make[1]: *** [Makefile:130: all] Error 2
make[1]: Leaving directory '/home/ellingtonj/wave-gui/build'
make: *** [Makefile:2: all] Error 2
这看起来是 IMGui 的问题。特别是 -lX----- 东西。我将尝试重新安装 ImGui 看看是否有帮助。也可能重新启动VM。只是看看这是否能解决任何问题。可能不会,但尝试一下也无妨。
最佳答案
在 xubuntu 18.04 上,为了构建这个项目,我必须安装:
libsdl2-dev libglfw3-dev libfftw3-dev。
要在 Centos 7 中安装它们(您在上一个线程中提到了 centos):
https://centos.pkgs.org/7/epel-x86_64/SDL2-2.0.10-1.el7.x86_64.rpm.html
https://centos.pkgs.org/7/epel-x86_64/SDL2-devel-2.0.10-1.el7.x86_64.rpm.html
https://centos.pkgs.org/7/epel-x86_64/glfw-3.2.1-2.el7.x86_64.rpm.html
https://centos.pkgs.org/7/epel-x86_64/glfw-devel-3.2.1-2.el7.x86_64.rpm.html
https://centos.pkgs.org/7/centos-x86_64/fftw-devel-3.3.3-8.el7.x86_64.rpm.html
启用@Rup 提到的EPEL 存储库将是一个好主意。
关于c++ - "fatal error: cg_config.h: No such file or directory"尝试使用 make 命令时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64539139/
说真的,你怎么能在不发疯的情况下处理所有这些异常呢?我是不是读了太多关于异常处理的文章或什么?我尝试重构了几次,但每次似乎都以更糟糕的结果告终。也许我应该承认确实会发生异常(exception)情况,
背景 两者 try/rescue和 try/catch是 Elixir 中的错误处理技术。根据 corresponding chapter在介绍指南中。 Errors can be rescued u
每当我尝试在 Raspberry PI 上运行此 python 脚本时,我都会遇到问题: import socket import sys # Create a TCP/IP socket sock
我想知道一些关于 PHP 的 try , catch声明。 让我们考虑以下示例。 abstract class ExceptionA extends Exception {} class Except
我的 laravel v5.4 项目中有两个模型,user 和 admin。 在 config/auth.php 中,我向守卫和提供者添加了管理员,如下所示: 'guards' => [ 'w
try: r = requests.get(url, params={'s': thing}) except requests.ConnectionError, e: print e
我有以下代码。 但是,它并不能捕获所有错误,而我仍然会收到“throw er;//未处理的'错误'事件”。 为什么是这样? app.post('/api/properties/zip/:zip/bed
问题与细节 我正在使用自定义错误处理,遇到的错误之一是“路径中的非法字符”。我有一个自定义函数,旨在通过路径字符串查找此类非法字符,并在找到它们时引发自定义错误。但是我发现,取决于非法字符,Test-
This question already has answers here: How do I catch a numpy warning like it's an exception (not j
我正在使用其他人的代码,但我不熟悉try/catch,因此我举了一个类似的小例子。在第11行上,如果我写了error(''),似乎没有发现错误并增加了索引j。但是,编写error(' ')或error
我在我的一个程序中遇到了这个问题,在这种情况下,尝试/异常(exception)的错误使程序变得更好,以防用户意外输入了他们不应该输入的内容。它仍然给我错误,我为为什么感到困惑。如果对我的问题确实很重
我在尝试TRY ... CATCH块时遇到问题。有人可以解释为什么以下代码无法执行我的sp吗? DECLARE @Result int SET @Result = 0 BEGIN TRY SE
我有一个相当大的 powershell 脚本,其中包含许多(20 多个)执行各种操作的函数。 现在所有代码实际上都没有任何错误处理或重试功能。如果某个特定的任务/功能失败,它就会失败并继续。 我想改进
为什么我尝试时需要导入 inputmismatchException catch(InputMismatchException e){ System.out.println("
我对此感到困惑 - 我为辅助方法编写了一个 try/catch 。它的目的是捕获任何无效输入(任何不是“男性”或“女性”的内容(没有特定情况)。如果输入无效,它将通知用户,然后让他们重试。如果有效,则
我有时会发现自己处于如下场景。尽可能简单地陈述问题 “有时我会创建一段代码,Java 让我将其包含在 try/catch 语句中。我没有使用 catch,所以我将其留空。为什么这是错误的?” boo
我有点困惑为什么当我不使用 Try block 时会出现 Try block 错误。 我在代码块底部附近收到错误通知。如果我不使用 try/catch,有人可以向我解释为什么会发生这种情况吗? 它是否
我已经盯着我的电脑两个小时了,我不知道我做错了什么。谁能帮助我看到光明? package blackjack; import java.util.Random; import java.util.Sc
我想将方法保存在 Enum 中,但 Class.getDeclaredMethod 抛出 NoSuchMethodException,那么我该如何处理呢?我的代码: public enum Car
这个问题已经有答案了: Executing multi-line statements in the one-line command-line (18 个回答) 已关闭 3 年前。 如何使用try.
我是一名优秀的程序员,十分优秀!