Relative Content

Tag Archive for c++qtcmakectestqtest

Cannot find shared lib on qtest when using VSCODE Qt5 QTest CTest CMake

I am currently migrating a Qt5 project based on QtCreator/QMake to VSCode/CMake environement.
I migrated the pro files to CMakeLists files in the main project and it works nicely in VSCode.
The issue I am facing is situated at the integration of unit tests, which are built with QTest.
To simplify the task and understand the requirements, I prepared a dummy project using Qt5 (only core) and QTest for the unit test part. The goal is to fully run it under VSCode (build, debug and run main executable and tests). The main executable is building and running smoothly, the test is building but it shows an error 0xc0000135, which is known to be related to dll not found.
Here is the project structure :