首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在linux上安装raylib的问题

在linux上安装raylib的问题
EN

Stack Overflow用户
提问于 2021-08-13 11:18:03
回答 1查看 1.3K关注 0票数 0

我正在使用Peppermint 10,一个基于ubuntu的发行版

因此,我执行了以下命令这里,一切都进行得很顺利,直到现在

代码语言:javascript
复制
(the input)

cmake -DBUILD_SHARED_LIBS=ON ..

(the output)

-- Testing if -Werror=pointer-arith can be used -- compiles

-- Testing if -Werror=implicit-function-declaration can be used -- compiles

-- Testing if -fno-strict-aliasing can be used -- compiles

-- Using raylib's GLFW

-- Using X11 for window creation

-- Audio Backend: miniaudio

-- Building raylib shared library

-- Generated build type: Debug

-- Compiling with the flags:

-- PLATFORM=PLATFORM_DESKTOP

-- GRAPHICS=GRAPHICS_API_OPENGL_33

-- Building examples is enabled

-- Testing if -std=c11 can be used -- compiles

-- Configuring done

CMake Error at src/CMakeLists.txt:57 (add_library):

Error evaluating generator expression:


$<TARGET_OBJECTS:glfw>


Objects of target "glfw" referenced but is not an OBJECT library.



CMake Error: CMake can not determine linker language for target: raylib

CMake Error: Cannot determine link language for target "raylib".

-- Generating done

-- Build files have been written to: /home/anas/raylib/build

我如何修复这些cmake错误?

但是我忽略了这些想法,认为这是正常的,但是当我尝试执行以下命令时

代码语言:javascript
复制
(the command aka the input)

make

(the output)

[ 7%] Built target glfw

make[2]: *** No rule to make target 'raylib/CMakeFiles/raylib.dir/build'. Stop.

CMakeFiles/Makefile2:87: recipe for target 'raylib/CMakeFiles/raylib.dir/all' failed

make[1]: *** [raylib/CMakeFiles/raylib.dir/all] Error 2

Makefile:162: recipe for target 'all' failed

make: *** [all] Error 2

当我尝试sudo make install时,它显示了同样的情况。

帮助,我仍然不知道问题在这里,顺便说一下,在wiki 这里之后

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-08-13 13:40:01

这样做:

  1. 数独apt安装g++
  2. sudo apt安装cmake (应该在3.11版或更高版本中)
  3. 下载到您的项目文件夹前。“新游戏”文件夹来自https://github.com/RobLoach/raylib-cpp/tree/master/projects/CMake的三个文件(main.cpp,README.md,CMakeLists.txt)
  4. 然后是cd new-game && mkdir build && cd build && cmake .. && make
  5. 运行./raylib-cpp-example
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68771383

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档