Windows下编译RTTR

C++11引入了RTTI、Metaprogramming 等技术,但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安装。

网络资料

Reflectionhttps://en.wikipedia.org/wiki/Reflection_%28computer_programming%29

The C++ Extensions for Reflection https://en.cppreference.com/w/cpp/experimental/reflect

RTTRhttps://www.rttr.org/QMetaObjecthttps://doc.qt.io/qt-5/qmetaobject.html

An Introduction to Reflection in C++https://blog.csdn.net/qq_26221775/article/details/138768568?spm=1001.2014.3001.5501

FreeCAD: C++ Generic Factory Method inteface advicehttps://forum.freecad.org/viewtopic.php?p=24221&hilit=BaseClass#p24221

相关推荐
柒@宝儿姐40 分钟前
若依 B 端从浏览器访问升级为 Windows 安装包交付流程
前端·javascript·vue.js·windows
肖恭伟1 小时前
MinerU 新手完整配置教程:Windows 下将 PDF 转为带图片的 Markdown
windows·pdf
PieroPc21 小时前
Windows 驱动备份与恢复工具 CMD .bat
windows
波罗丁牌21 小时前
逆变与协变详解
windows·microsoft
映翰通朱工1 天前
Windows 上位机 + EC3320:USB 转 CAN 通信实测(从接线到 SSH 收包)
windows·stm32·ssh
我是Superman丶1 天前
【2026亲测】Wireshark安装教程 Windows系统|下载安装、Npcap配置及首次抓包
windows·测试工具·wireshark
贾天佑忆月 迷失的昵1 天前
Direct3D Draw函数 异步调用原理解析
服务器·windows·性能优化
sg_knight1 天前
Codex CLI 安装全攻略:macOS / Linux / Windows(WSL2)三端实战
linux·windows·macos·openai·ai编程·coding·codex
趣味科技2 天前
记录修复EAGET忆捷移动硬盘损坏
windows·数据分析·硬件工程
我命由我123452 天前
Java 开发 - List subList 方法
java·windows·操作系统·list·intellij-idea·idea·intellij idea