<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: ziad Z3TAR</title>
    <description>The latest articles on Forem by ziad Z3TAR (@ziad_z3tar).</description>
    <link>https://forem.com/ziad_z3tar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3534365%2F2992c977-1d56-43f3-9d84-5072fad9b3a8.jpg</url>
      <title>Forem: ziad Z3TAR</title>
      <link>https://forem.com/ziad_z3tar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ziad_z3tar"/>
    <language>en</language>
    <item>
      <title>launch.json solved</title>
      <dc:creator>ziad Z3TAR</dc:creator>
      <pubDate>Sat, 04 Oct 2025 10:36:41 +0000</pubDate>
      <link>https://forem.com/ziad_z3tar/launchjson-solved-2pdm</link>
      <guid>https://forem.com/ziad_z3tar/launchjson-solved-2pdm</guid>
      <description>&lt;p&gt;i had a problem in VScode cpp build , it always failed and pop up &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffimhhy4u66hxpi65se7b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffimhhy4u66hxpi65se7b.png" alt=" " width="724" height="153"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;then i click &lt;strong&gt;Debug Anyway&lt;/strong&gt; then pops up &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4u6jh8wm17qbm0i75u29.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4u6jh8wm17qbm0i75u29.png" alt=" " width="696" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;i stressed alot and try to setup &lt;em&gt;.vscode&lt;/em&gt; folder many times.&lt;/p&gt;

&lt;p&gt;i tried to build the cpp file using many shells , i tried  &lt;em&gt;cmd&lt;/em&gt; and it didn't work ,&lt;em&gt;pwsh&lt;/em&gt; also didn't work ,finally i Used the shell of the &lt;strong&gt;MSYS2 MINGW64&lt;/strong&gt; because that the one i setup it,and it &lt;em&gt;&lt;strong&gt;works&lt;/strong&gt;&lt;/em&gt;✨.&lt;/p&gt;

&lt;p&gt;i tried to make the file build and run inside VScode using the &lt;strong&gt;MSYS2 MINGW64&lt;/strong&gt; shell it self instead of making it runs through pwsh,and i manage it by .vscode/settings.json:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"terminal.integrated.profiles.windows"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"bash (MSYS2)"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;msys64&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;usr&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bin&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bash.exe"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="s2"&gt;"-l"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="s2"&gt;"-i"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"MSYSTEM"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"MINGW64"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"icon"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"terminal-bash"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"terminal.integrated.defaultProfile.windows"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bash (MSYS2)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"editor.formatOnSave"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this made the default shell is &lt;strong&gt;MINGW64&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  THE LAST PIECE OF PUZZLE (THE REAL PROBLEM)
&lt;/h2&gt;

&lt;p&gt;i find that after setting up the &lt;em&gt;tasks.json&lt;/em&gt; &amp;amp; &lt;em&gt;launch.json&lt;/em&gt; that ✨finally✨ it run inside VScode it self , i was so happy and copy and paste the &lt;em&gt;.vscode&lt;/em&gt; folder everywhere , but something &lt;em&gt;weird&lt;/em&gt;  happened , sometimes it build and run , and somtimes it fails due to the same previous error (the two popup messages in the start), i was shocked "is the error wasn't in the build or what"&lt;br&gt;
finally , i found the real hidden problem (that you should try now if you had the same pop up messages) is &lt;strong&gt;QUADRATIC QUOTES&lt;/strong&gt; , yep&lt;br&gt;
inside &lt;strong&gt;tasks.json&lt;/strong&gt; , you probably has :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="s2"&gt;"${file}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="s2"&gt;"-o"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="s2"&gt;"${fileDirname}/${fileBasenameNoExtension}.exe"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and this is the problem , when this path passed to the shell ; it passed without the &lt;em&gt;""&lt;/em&gt; , why ? &lt;br&gt;
because these quotes was the &lt;em&gt;json string quotes&lt;/em&gt; , mean that when it passed to the shell and run ; it runs without quotes , and this can cause path problem if it has space or special chars .&lt;br&gt;
the solution is &lt;em&gt;quadratic quotes&lt;/em&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;${file}&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"-o"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;${fileDirname}/${fileBasenameNoExtension}.exe&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;by this , two quotes will be removed and still be additional quotes to passed as &lt;em&gt;"----"&lt;/em&gt; to the shell which solve the "no such file or directory  with name ext..." error&lt;/p&gt;

&lt;h2&gt;
  
  
  I wish my story help someone to setup cpp in VScode
&lt;/h2&gt;

</description>
      <category>vscode</category>
      <category>cpp</category>
      <category>msys2</category>
      <category>mingw</category>
    </item>
    <item>
      <title>msys64 setup problem</title>
      <dc:creator>ziad Z3TAR</dc:creator>
      <pubDate>Sat, 27 Sep 2025 22:38:21 +0000</pubDate>
      <link>https://forem.com/ziad_z3tar/msys64-setup-problem-510d</link>
      <guid>https://forem.com/ziad_z3tar/msys64-setup-problem-510d</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;help me !!!&lt;/strong&gt;&lt;/em&gt;, this message keep appearing , i enter that stupid json file and ask copilot what to write , and everytime it doesn't work &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmtcrgc75cb53jdqfjv7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmtcrgc75cb53jdqfjv7.png" alt=" " width="724" height="153"&gt;&lt;/a&gt;&lt;br&gt;
for more info : this message popup first then i click &lt;strong&gt;debug anyway&lt;/strong&gt; , and then that json related message pops up    &lt;/p&gt;

</description>
      <category>cpp</category>
      <category>compiling</category>
      <category>errors</category>
      <category>help</category>
    </item>
  </channel>
</rss>
