SlicerCustomAppTemplate Build Error

Hi there,

I am having trouble building SlicerCustomAppTemplate while I am not encountering any errors when building the latest version of Slicer.

Here is my configuration:

Windows 11
Cmake 3.22.4
Qt 5.15.2
Visual Studio 2022

As defined here, I downloaded the source folder of SlicerCustomAppTemplate via :
pip install cookiecutter jinja2-github
cookiecutter gh:KitwareMedical/SlicerCustomAppTemplate

Here I do not change anything in the source folder.

To build I am following steps mentioned Here.

Build error indicates inability to open ‚ÄėvtkSlicerSceneViewsModuleLogic.lib‚Äô

The Configuration, Generation and Build log files could be find Here as well as errors from Visual Studio.

Can you please help me to solve this error ?
Thank you

Have a look at the first error. All the other may be consequences of the first one.

As I see, this is the first error:

14>  Syntax error in cmake code at
14>    C:/D/S5D/slicersources-build/CTKAppLauncherLib-prefix/tmp/CTKAppLauncherLib-cache-Debug.cmake:19
14>  when parsing string
14>    C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5
14>  Invalid escape sequence \Q

It means that somewhere you specified Qt path using Windows separators () instead of cross-platform separators (/). The backslash was interpreted somewhere as escape character, which caused the build error.

Try using C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5 as Qt path.

1 Like

Dear Lassoan,

Thank you for your response !
I’m now able to build SlicerCAT in 5.2.1 version without errors.

Best regards,

This was tentatively addressed in Slicer@d4723511c integrated through PR-6790, as we are also experiencing a similar error in a custom application when doing a clean build, I am looking into this.

1 Like

This should be fixed in PR-6834 that will be integrated shortly.