Windows下编译RTTR

C++11引入了dynamic_cast、type_info等RTTI(Run-Time Type Identification)工具,但C++在Reflection编程方面功能依旧有限。在社区上,RTTR则提供了一套C++编写的反射库,补充了C++在Reflection方面的缺陷。

零、环境

操作系统 Windows 11
Visual Studio Visual Studio Community 2022 
CMake CMake 3.24.2
Doxygen Doxygen-1.9.8

一、下载源码

从GitHub拉取RTTR代码:

git clone https://github.com/rttrorg/rttr.git

二、编译

按照下表配置CMake,并完成构建与生成,

Where is the source code Windows 11
Where to build the binaries Visual Studio Community 2022 
CMAKE_INSTALL_PREFIX CMake 3.24.2

打开rttr.sln,构建"ALL_BUILD"完成RTTR编译;构建"INSTALL"完成RTTR安装。

网络资料

RTTRicon-default.png?t=N7T8https://www.rttr.org/QMetaObjecticon-default.png?t=N7T8https://doc.qt.io/qt-5/qmetaobject.html

 An Introduction to Reflection in C++icon-default.png?t=N7T8https://blog.csdn.net/qq_26221775/article/details/138768568?spm=1001.2014.3001.5501

FreeCAD: C++ Generic Factory Method inteface adviceicon-default.png?t=N7T8https://forum.freecad.org/viewtopic.php?p=24221&hilit=BaseClass#p24221

相关推荐

  1. windows编译libiconv库

    2024-05-14 11:56:04       59 阅读
  2. Windows VS2022 编译OpenSSL 库

    2024-05-14 11:56:04       46 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-14 11:56:04       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-14 11:56:04       100 阅读
  3. 在Django里面运行非项目文件

    2024-05-14 11:56:04       82 阅读
  4. Python语言-面向对象

    2024-05-14 11:56:04       91 阅读

热门阅读

  1. Android 开机过程画面

    2024-05-14 11:56:04       32 阅读
  2. iOS学习- iOS获取指定月的天数

    2024-05-14 11:56:04       23 阅读
  3. vue3基于elementplus 简单实现表格二次封装

    2024-05-14 11:56:04       30 阅读
  4. 【Vue】vue中动态样式绑定

    2024-05-14 11:56:04       30 阅读
  5. 《创意代码:Processing艺术编程之旅》系列目录

    2024-05-14 11:56:04       32 阅读
  6. ArrayList与LinkedList的区别

    2024-05-14 11:56:04       34 阅读
  7. 【Golang】Golang 的 HTTP 使用 Header 指南

    2024-05-14 11:56:04       27 阅读
  8. 工作随机:linux 挂载LVM管理模式的磁盘

    2024-05-14 11:56:04       33 阅读
  9. Linux sigaddset

    2024-05-14 11:56:04       36 阅读
  10. linux开机启动配置文件

    2024-05-14 11:56:04       33 阅读
  11. QML进阶(十七) ECMAScript 语法介绍

    2024-05-14 11:56:04       30 阅读
  12. P2678 [NOIP2015 提高组] 跳石头

    2024-05-14 11:56:04       36 阅读
  13. Cocos Creator 3.x 实现触摸拖动物体(record)

    2024-05-14 11:56:04       38 阅读
  14. npm常用命令汇总

    2024-05-14 11:56:04       36 阅读
  15. 【八股系列】React中props和state的区别是什么?

    2024-05-14 11:56:04       33 阅读