RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / 问题 / 1364434
Accepted
timob256
timob256
Asked:2022-05-21 21:26:50 +0000 UTC2022-05-21 21:26:50 +0000 UTC 2022-05-21 21:26:50 +0000 UTC

错误:SDL/SDL_gamecontroller.h:没有这样的文件或目录#include <SDL/SDL_gamecontroller.h>

  • 772

收集到 Urho3D-1.8-ALPHA(一切都组装好了)

决定从Urho3D构建一个简单的示例

但由于某种原因,它写入的文件甚至不在项目中(受保护的内部),没有标题 SDL_gamecontroller.h ,虽然它不存在这样的文件在 SDL2/SDL_gamecontroller.h 但我不想修复内部系统文件

我无法理解他(cmake)是如何收集所有示例的,但我无法应付(我连接了所有库),这是本地化错误:

urno_example1.pro

#-------------------------------------------------
#
# Project created by QtCreator 2021-12-21T11:52:47
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = urno_example1
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0


SOURCES += \
#        main.cpp \
#        mainwindow.cpp
    HelloWorld.cpp \
    Sample.inl

HEADERS += \
#        mainwindow.h
    HelloWorld.h \
    Sample.h

INCLUDEPATH +=/home/dima/ogre/Urho3D-1.8-ALPHA/Source/ThirdParty/SDL/include \
        /home/dima/ogre/Urho3D-1.8-ALPHA/build/Source/ThirdParty/SDL/include/generated \
        /usr/local/include/Urho3D                                             \
#    /home/dima/ogre/Urho3D-1.8-ALPHA/build/include/Urho3D                    \
#    /home/dima/ogre/Urho3D-1.8-ALPHA/build/include/Urho3D/ThirdParty/SDL     \
#    /usr/include/SDL                                                         \
#    /usr/include/SDL2


unix:!macx: LIBS += -L$$PWD/../../../../usr/local/lib/Urho3D/ -lUrho3D

INCLUDEPATH += $$PWD/../../ogre/Urho3D-1.8-ALPHA/Source/Urho3D
DEPENDPATH += $$PWD/../../ogre/Urho3D-1.8-ALPHA/Source/Urho3D

unix:!macx: PRE_TARGETDEPS += $$PWD/../../../../usr/local/lib/Urho3D/libUrho3D.a

unix:!macx: LIBS += -L$$PWD/../../ogre/Urho3D-1.8-ALPHA/build/Source/ThirdParty/SDL/ -lSDL

INCLUDEPATH += $$PWD/../../ogre/Urho3D-1.8-ALPHA/Source/ThirdParty/SDL/include
DEPENDPATH += $$PWD/../../ogre/Urho3D-1.8-ALPHA/Source/ThirdParty/SDL/include

unix:!macx: PRE_TARGETDEPS += $$PWD/../../ogre/Urho3D-1.8-ALPHA/build/Source/ThirdParty/SDL/libSDL.a


# --- linux ---

unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/x86_64-linux-gnu/ -lOpenGL

INCLUDEPATH += $$PWD/../../../../usr/include/GL
DEPENDPATH += $$PWD/../../../../usr/include/GL

unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/x86_64-linux-gnu/ -lGLEW

INCLUDEPATH += $$PWD/../../../../usr/include/GL
DEPENDPATH += $$PWD/../../../../usr/include/GL

unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/x86_64-linux-gnu/ -lglut

INCLUDEPATH += $$PWD/../../../../usr/include/GL
DEPENDPATH += $$PWD/../../../../usr/include/GL

unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/x86_64-linux-gnu/ -lGLU

INCLUDEPATH += $$PWD/../../../../usr/include/GL
DEPENDPATH += $$PWD/../../../../usr/include/GL


//
// Copyright (c) 2008-2019 the Urho3D project.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

你好世界.h

    #pragma once
    #include "SDL.h"
    #include "Sample.h"
    
    /// This first example, maintaining tradition, prints a "Hello World" message.
    /// Furthermore it shows:
    ///     - Using the Sample / Application classes, which initialize the Urho3D engine and run the main loop
    ///     - Adding a Text element to the graphical user interface
    ///     - Subscribing to and handling of update events
    class HelloWorld : public Sample
    {
        URHO3D_OBJECT(HelloWorld, Sample);
    
    public:
        /// Construct.
        explicit HelloWorld(Context* context);
    
        /// Setup after engine initialization and before running the main loop.
        void Start() override;
    
    protected:
        /// Return XML patch instructions for screen joystick layout for a specific sample app, if any.
        String GetScreenJoystickPatchString() const override { return
            "<patch>"
            "    <add sel=\"/element/element[./attribute[@name='Name' and @value='Hat0']]\">"
            "        <attribute name=\"Is Visible\" value=\"false\" />"
            "    </add>"
            "</patch>";
        }
    
    private:
        /// Construct a new Text instance, containing the 'Hello World' String, and add it to the UI root element.
        void CreateText();
        /// Subscribe to application-wide logic update events.
        void SubscribeToEvents();
        /// Handle the logic update event.
        void HandleUpdate(StringHash eventType, VariantMap& eventData);
    };

/usr/local/include/Urho3D/Input/InputConstants.h:31: ошибка: SDL/SDL_gamecontroller.h: No such file or directory
 #include <SDL/SDL_gamecontroller.h>
                                    ^

жалуется на /usr/local/include/Urho3D/Input/InputConstants.h 

我将如何跳过这个挑剔的 vseravno 控制器将无法连接。


在此处输入图像描述

在此处输入图像描述

qtcreator
  • 1 1 个回答
  • 10 Views

1 个回答

  • Voted
  1. Best Answer
    timob256
    2022-05-27T21:09:06Z2022-05-27T21:09:06Z

    一般来说,这里https://github.com/SirNate0/Urho-Project-Template是答案,一个单独的原子化项目,你只需要把你的 .cpp .h ,一切都会好起来的:3

    答案在这里给了我https://discourse.urho3d.io/t/error-sdl-sdl-gamecontroller-h-no-such-file-or-directory-include-sdl-sdl-gamecontroller-h/7107 /4

    • 0

相关问题

  • 如何正确学习 QML?

  • Qmake 和重建所有

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    表格填充不起作用

    • 2 个回答
  • Marko Smith

    提示 50/50,有两个,其中一个是正确的

    • 1 个回答
  • Marko Smith

    在 PyQt5 中停止进程

    • 1 个回答
  • Marko Smith

    我的脚本不工作

    • 1 个回答
  • Marko Smith

    在文本文件中写入和读取列表

    • 2 个回答
  • Marko Smith

    如何像屏幕截图中那样并排排列这些块?

    • 1 个回答
  • Marko Smith

    确定文本文件中每一行的字符数

    • 2 个回答
  • Marko Smith

    将接口对象传递给 JAVA 构造函数

    • 1 个回答
  • Marko Smith

    正确更新数据库中的数据

    • 1 个回答
  • Marko Smith

    Python解析不是css

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5