英特尔
直播中

李子跃

7年用户 200经验值
私信 关注
[问答]

如何将Imgui库导入C ++项目?

你好,
有谁知道如何将Imgui库导入C ++项目?
我尝试了很多方法,但似乎都没有。
我试图获得一个示例[Streams Alignment](librealsense / examples / align at master·IntelRealSense / librealsense·GitHub)工作,但无论我尝试什么,#include例如仍然无法工作,即使我已添加它
在Solution Explorer本身等
对这样一个问题道歉,这对我来说是一个挑战性的东西。
经过多次试验和错误后,才设法了解如何使用英特尔Realsense D435从头开始创建新项目。
创建新的Visual C ++项目(推荐:空项目)转到视图>其他Windows>属性管理器单击“添加现有属性表”iconNavigate到“C: Program Files(x86) Intel RealSense SDK 2.0”添加intel.realsense.props
,现在可以使用#include导航到文件ExplorerCopy中新创建的Project并粘贴这些文件[example.hpp,int-rs-splash.hpp,stb_easy_font.h,stb_image.h,stb_image_write.h] insideRight单击源文件
解决方案Explorer创建新的CPP文件(名称:Source.CPP)刷新CPP项目将欣赏任何指导。
再一次感谢你

以上来自于谷歌翻译


以下为原文

Hello,

Does anyone know how to import the Imgui library into a C++ Project? I have tried many methods but none seem to work.

I am trying to get an example [Streams Alignment](librealsense/examples/align at master · IntelRealSense/librealsense · GitHub ) to work, but no matter what i try, #include for example still does not work even though I have added it in Solution Explorer itself etc.

Apologies for such a question, this is challenging stuff for me. Only managed to figure out how to create a new project from scratch with the Intel Realsense D435 after many trials and error.

  • Create new Visual C++ Project (Recommended: Empty Project)
  • Go to View > Other Windows > Property Manager
  • Click on "Add Existing Property Sheet" icon
  • Navigate to "C:Program Files (x86)Intel RealSense SDK 2.0"
  • Add intel.realsense.props, now #include can be used
  • Navigate to your newly created Project in File Explorer
  • Copy and paste these files [example.hpp, int-rs-splash.hpp, stb_easy_font.h, stb_image.h, stb_image_write.h] inside
  • Right Click on Source Files in Solution Explorer
  • Create new CPP File (Name: Source.CPP)
  • Refresh CPP Project

Would appreciate any guidance. Thank you once again

回帖(1)

卿洁

2018-10-23 09:32:23
似乎在项目的CMakeList.txt文件中,您应该引用Imgui文件的位置(位于SDK的第三方文件夹中)。
链接到下面的示例来自Align项目。
开发中的librealsense / CMakeLists.txt·IntelRealSense / librealsense·GitHub
我不使用Visual Studio和RealSense进行项目编译(我在Unity游戏引擎中开发),因此本论坛上的其他人将能够更好地为您提供有关如何在项目中设置和使用CMake的建议。

以上来自于谷歌翻译


以下为原文

It seems that in your project's CMakeList.txt file, you should be referencing the location of the Imgui files (which are in the Third Party folder of the SDK).  The example linked to below is from the Align project.
 
librealsense/CMakeLists.txt at development · IntelRealSense/librealsense · GitHub
 
I do not use Visual Studio with RealSense for project compiling though (I develop in the Unity games engine), so others on this forum will be better able to advise you on how to set up and use CMake in your project.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分