# Qt6 and CMake - Unable to Link Library (R3DSDK)

**URL:** <https://discourse.cmake.org/t/qt6-and-cmake-unable-to-link-library-r3dsdk/14973>\
**Category:** Code\
**Tags:** os:windows\
**Created:** [August 8, 2025, 6:46am UTC](https://discourse.cmake.org/t/qt6-and-cmake-unable-to-link-library-r3dsdk/14973 "2025-08-08T06:46:16Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![bill.hoffman](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bill.hoffman/32/13_2.png) [@bill.hoffman](https://discourse.cmake.org/u/bill.hoffman)\
**Post date:** [August 8, 2025, 8:00pm UTC](https://discourse.cmake.org/t/qt6-and-cmake-unable-to-link-library-r3dsdk/14973/5 "2025-08-08T20:00:19Z")

</div>

> [@bayetan](#):
>
> cl “C:\Users\Dell-9710\Documents\Qt\R3D\R3D\_LL\Hello\GetSdkVersionSample.cpp” /nologo /W3 /O2 /D NDEBUG /EHsc /MD /I"C:\Users\Dell-9710\Documents\Qt\R3D\R3D\_LL\Hello" /link “C:\Users\Dell-9710\Documents\Qt\R3D\R3D\_LL\Hello\R3DSDK-2017MD.lib” /out:MainCheckSdkVersion.exe

This is using the cl compiler (MSVC). In your CMake example you are using g++. That is likely the reason it can’t find symbols from your R3DSDK-2017MD.lib library to link. You need to use cl and not g++. To do that with CMake make sure you run CMake from a command prompt where the compiler is initialized correctly by running vcvars.bat.

---

_[View the full topic](https://discourse.cmake.org/t/qt6-and-cmake-unable-to-link-library-r3dsdk/14973)._
