title: Trouble launching QApplication class with VSCode & C++
body: <p>I am new to C++ as well as VSCode, so this issue might have a really simple answer I'm just overlooking. I'm trying to build an application using the Qt library after having loved its PyQt variant, but I cannot get the simplest possible app to launch from the VSCode terminal.
  Here's the program I try to build and run:</p>
  <pre><code>// main.cpp - I copied and pasted the Qt documentation example after I had Qt import issues
  // (which I have since resolved)
  #include &lt;iostream&gt;
  #include &lt;QApplication&gt;
  #include &lt;QPushButton&gt;
  
  int main(int argc, char *argv[])
  {
      std::cout &lt;&lt; &quot;So far&quot;;
      QApplication qga (argc, argv);
      QPushButton btn (&quot;ayo&quot;);
      btn.show();
      return qga.exec();
  }
  </code></pre>
  <p>Here's the CMakeLists.txt file that builds the app:</p>
  <pre><code>cmake_minimum_required(VERSION 3.16)
  project(trial VERSION 0.1.0)
  
  set(CMAKE_CXX_STANDARD 17)
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
  
  
  set(CMAKE_PREFIX_PATH &quot;C:/Qt/6.3.0/mingw_64/&quot;)
  set(CMAKE_INCLUDE_CURRENT_DIR ON)
  find_package(Qt6 REQUIRED COMPONENTS Widgets Gui Core)
  
  qt_standard_project_setup()
  
  
  add_executable(trial main.cpp)
  
  target_link_libraries(trial PRIVATE Qt6::Widgets Qt6::Gui Qt6::Core)
  include(CPack)
  </code></pre>
  <p>These are the components I'm using:</p>
  <ul>
  <li>VS Code 2017</li>
  <li>CMake (extension)</li>
  <li>CMake Tools (extension)</li>
  <li>Qt tools (extension)</li>
  <li>GCC 8.1.0x86_64-w64-mingw32 compiler</li>
  <li>Qt 6.3.0</li>
  </ul>
  <p>What confuses me is that the program builds seemingly without error - the program finds Qt and throws no error when compiling. But whenever I launch it from the VS Code terminal, nothing happens. No statement is printed nor is any window launched.
  In case it helps, here's the output when I try to launch it:</p>
  <pre><code>[variant] Loaded new set of variants
  [kit] Successfully loaded 5 kits from C:\Users\astro\AppData\Local\CMakeTools\cmake-tools-kits.json
  [proc] Executing command: C:\MinGW64\bin\gcc.exe -v
  [main] Configuring folder: qttrial 
  [proc] Executing command: &quot;C:\Program Files\CMake\bin\cmake.EXE&quot; --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=C:\MinGW64\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\MinGW64\bin\g++.exe -Sc:/Users/astro/Desktop/Git/qttrial -Bc:/Users/astro/Desktop/Git/qttrial/build -G &quot;MinGW Makefiles&quot;
  [cmake] Not searching for unused variables given on the command line.
  [cmake] -- The C compiler identification is GNU 8.1.0
  [cmake] -- The CXX compiler identification is GNU 8.1.0
  [cmake] -- Detecting C compiler ABI info
  [cmake] -- Detecting C compiler ABI info - done
  [cmake] -- Check for working C compiler: C:/MinGW64/bin/gcc.exe - skipped
  [cmake] -- Detecting C compile features
  [cmake] -- Detecting C compile features - done
  [cmake] -- Detecting CXX compiler ABI info
  [cmake] -- Detecting CXX compiler ABI info - done
  [cmake] -- Check for working CXX compiler: C:/MinGW64/bin/g++.exe - skipped
  [cmake] -- Detecting CXX compile features
  [cmake] -- Detecting CXX compile features - done
  [cmake] -- Looking for pthread.h
  [cmake] -- Looking for pthread.h - found
  [cmake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  [cmake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  [cmake] -- Check if compiler accepts -pthread
  [cmake] -- Check if compiler accepts -pthread - yes
  [cmake] -- Found Threads: TRUE  
  [cmake] -- Performing Test HAVE_STDATOMIC
  [cmake] -- Performing Test HAVE_STDATOMIC - Success
  [cmake] -- Found WrapAtomic: TRUE  
  [cmake] -- Found WrapVulkanHeaders: C:/VulkanSDK/1.3.211.0/Include  
  [cmake] -- Configuring done
  [cmake] -- Generating done
  [cmake] -- Build files have been written to: C:/Users/astro/Desktop/Git/qttrial/build
  [main] Building folder: qttrial trial
  [build] Starting build
  [proc] Executing command: &quot;C:\Program Files\CMake\bin\cmake.EXE&quot; --build c:/Users/astro/Desktop/Git/qttrial/build --config Debug --target trial -j 14 --
  [build] [ 25%] Automatic MOC and UIC for target trial
  [build] [ 25%] Built target trial_autogen
  [build] [ 50%] Building CXX object CMakeFiles/trial.dir/trial_autogen/mocs_compilation.cpp.obj
  [build] [ 75%] Building CXX object CMakeFiles/trial.dir/main.cpp.obj
  [build] [100%] Linking CXX executable trial.exe
  [build] [100%] Built target trial
  [build] Build finished with exit code 0
  </code></pre>
  <p>Terminal results:</p>
  <pre><code>PS C:\Users\astro\Desktop\Git\qttrial\build&gt; .&quot;C:/Users/astro/Desktop/Git/qttrial/build/trial.exe&quot;
  PS C:\Users\astro\Desktop\Git\qttrial\build&gt;
  </code></pre>
  <p>I would be immensely grateful to anyone who can point me in a direction to solve this. Given that there are no error messages, I'm lost as to where to start. If any of you guys need any more information, I'll be happy to supply it. :)</p>