# Qt creator can't see execution files after building from source

**URL:** <https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688>\
**Category:** Support\
**Created:** [November 19, 2020, 1:41pm UTC](https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688 "2020-11-19T13:41:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [November 19, 2020, 1:41pm UTC](https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688/1 "2020-11-19T13:41:46Z")

</div>

Hi,

I built Slicer from source in debug mode. Now I’m trying to work with Slicer as with usual project but Qt creator can’t see any execution file and moreover header files are inactive like in the picture below:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/2/723fa1c91f2ed0ea5c6c5d372cc4896429fedcfa.png)

I suspect that because those execution files are not added in CMakLists.txt  
How usually people debug SLicer?

Windows 10, MSVC 2017, Qt 5.14.2, ninja, Master Slicer branch  
Slicer source dir: C:\S\Slicer  
Build dir: C:\S\d

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [November 20, 2020, 12:34pm UTC](https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688/2 "2020-11-20T12:34:43Z")

</div>

I built SLicer using **.bat** :

```
set SLICER_SOURCE_DIR="C:/S/Slicer"
set SLICER_BIN_DIR="C:/S/d"
set SLICER_QMAKE_EXE="C:/Qt/5.14.2/msvc2017_64/bin/qmake.exe"
set CMAKE_EXE="C:/Qt/Tools/CMake_64/bin/cmake.exe"
set CTEST_EXE="C:/Qt/Tools/CMake_64/bin/ctest.exe"

mkdir %SLICER_BIN_DIR%
cd /d %SLICER_BIN_DIR%

%CMAKE_EXE% %SLICER_SOURCE_DIR% -G Ninja -DQT_QMAKE_EXECUTABLE:PATH=%SLICER_QMAKE_EXE% -DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=ON ^
-DSlicer_USE_SimpleITK:BOOL=OFF ^
-DQt5_DIR="C:/Qt/5.14.2/msvc2017_64/lib/cmake/Qt5" ^
-DCMAKE_BUILD_TYPE=Debug ^
-DCMAKE_INSTALL_PREFIX=C:/S/i

```

Next, [according to the documentation](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/QtCreator) I should be able to launch QtCreator with:

```
cd C:\S\d\Slicer-build
.\Slicer.exe --launch C:\Qt\Tools\qtcreator-4.11.0\bin\qtcreator.exe

```

But I get error:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/d/fd7f769184dc89a07d3407ed4a9c00af037e2a3d.png)

Still struggling…

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [November 20, 2020, 1:36pm UTC](https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688/3 "2020-11-20T13:36:17Z")

</div>

Have you tried building using my configuration as described in [https://github.com/Slicer/Slicer/issues/5300#issuecomment-728351584](https://github.com/Slicer/Slicer/issues/5300#issuecomment-728351584)?

Slicer 4.11.20200930 git tag, VS 2019, Qt 5.15.1 (MSVC 2019, 64-bit) and a recent CMake version (I use CMake 3.18.4 successfully).

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [November 20, 2020, 1:54pm UTC](https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688/4 "2020-11-20T13:54:03Z")

</div>

@jamesobutler Hi,

I tried to use stable release with `git checkout v4.11.20200930` but the problem occurs when building `LibArchive`. It is discussed here [LibArchive build errors](https://discourse.slicer.org/t/libarchive-build-errors/13310)

Thus I’m working with master branch.

I have not tried VS 2019 and Qt 5.15.1 as my other project uses VS2017 and Qt 5.14.2

I can try to rebuild Slicer with VS 2019, Qt 5.15.1 (or even Qt 5.15.2) but what to do with `LibArchive`? Should I still use master branch or 4.11.20200930 git tag? Or maybe I will not encounter such problem with VS 2019

I will rebuilt it and report the result

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [November 21, 2020, 1:44pm UTC](https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688/5 "2020-11-21T13:44:29Z")

</div>

@jamesobutler hi,

I just compiled SLicer 4.11.20200930 git tag with MSVC 2019 and Qt 5.14.2

I still got the error:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/a/1a6fdb7461ec454bc2ae46825d7400393c654b0a.png)  
But I can skip it and continue to normally launch Slicer.

The main question is still undclear, how to open Slicer project and debug Slicer in Qt?  
I follow this documentation [Documentation/Nightly/Developers/Tutorials/QtCreator - Slicer Wiki](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/QtCreator)  
I typed:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/2/92bfcda928b2dbe0f9548a8ac5c5295100635d36.png)  
and with MSVC 2019 Qt 5.15.2 it doesn’t give platform plugin error anymore. That is good. After I press `ENTER` nothing happens. THose two lines in CMD are shown.

and this is how my project is look like:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/a/ba61270565388902f4045128c4e3a8dd74cd3233.png)

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [November 21, 2020, 3:28pm UTC](https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688/6 "2020-11-21T15:28:21Z")

</div>

I’ve never used the Qt Creator IDE so I can’t provide much help on how to proceed there.

You can also view info at [https://slicer.readthedocs.io/en/latest/developer\_guide/build\_instructions/windows.html?highlight=Debugging#debug-slicer](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html?highlight=Debugging#debug-slicer) which has some information about various Slicer debugging using Visual Studio whether C++ or Python based debugging.

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [November 22, 2020, 1:58pm UTC](https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688/7 "2020-11-22T13:58:12Z")

</div>

@jamesobutler hi,

Thank you a lot! Finally when I 99 % followed the [instructions from here](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html?highlight=Debugging#debug-slicer) (previously I used to build it with Ninja and now I’ve built it with VS 2019 x64 build system) I could launch Slicer from VS 2019 and stop it at a break point in debug mode.

As I don’t really like writing code in VS I’m going to download and try to use VS code. If there is something that I should know about this idea, please notify me 🙂

By the way now there is no any errors when I launch Slicer as it used to be earlier.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 4, 2020, 5:21am UTC](https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688/8 "2020-12-04T05:21:11Z")

</div>

3 posts were split to a new topic: [Use HDF5 library in a Slicer module](https://discourse.slicer.org/t/use-hdf5-library-in-a-slicer-module/14877)

---

<div class="post-metadata">

**Author:** ![SteveLiu](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SteveLiu](https://discourse.slicer.org/u/SteveLiu)\
**Post date:** [June 28, 2022, 4:54am UTC](https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688/9 "2022-06-28T04:54:51Z")

</div>

Hello I am stuck by the same step in qtcreator Ubuntu OS  
Would you like to share some detailed steps to configure the project

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [June 28, 2022, 6:15am UTC](https://discourse.slicer.org/t/qt-creator-cant-see-execution-files-after-building-from-source/14688/10 "2022-06-28T06:15:41Z")

</div>

@SteveLiu QtCreator doesn’t support intellisense and other staff for cmake superbuild projects (I as I know).

**How I use QtCreator with Slicer:**  
Slicer may build extensions along. (or you can find any and build it externally by yourself).  
Extension is a complete cmake project that you can open with QtCreator.  
Extension needs to `find_package(Slicer)` and usually it uses some headers from Slicer `#include <qSlicer...>`.

If you open an extension in QtCreator then you will see that intellisense work fine there (probably if the extension doesn’t use Superbuild).

Also if you then open Slicer source files while the extension is an active project in QtCreator than you will find that intellisense also work for Slicer (probably not as good as for regular project but it is pretty enough).

To make a little easier I prefer switching the mode of a tree view in left upper corner: from `Projects` to `Files system` so that there is no greyer-out header and source files
