C++ Qt + VS Code + Torizon IDE Extension + CMake....: Could not find moc executable target Qt6::moc

Well there’s a lot to potentially dissect here.

This is when build error occurs.

First of all, what’s the build error? Is it the same as the first one you shared? Different? What are the exact logs of the error?

I added to the same template/project my own files (.h, .cpp, .ui, .qrc) and updated the CMakeLists.txt and main.cpp

You’ve changed a lot of files in the project all at once, this could make it difficult to determine what is causing the issue. If you could change things slowly in smaller steps, it would make it easier in theory to determine what change causes the error.

updated the CMakeLists.txt

Did you update the CMakeLists.txt file to be the same as what you shared in your initial post?

If you did I can already say this probably would cause issues with our extension. For example I can see in your initial CMakeLists.txt that you shared you set several file-paths . Setting these file-paths do not really make sense in our extension. As I said previously our extension works by cross compiling your application within a container. A container has it’s own filesystem. Therefore setting file-paths would not make sense in this context.

Typically from what I’ve seen from other customers they need only to install the libraries they need for their application. Then they customize their project to find and link these libraries against their application. For example see how another customer configured their project in this other thread: Visual Studio Code Qt template

Best Regards,
Jeremias