Every time i run it it just gives me this:
PS C:\Users\isido\Programaming\Cpp.vscode> & 'c:\Users\isido.vscode\extensions\ms-vscode.cpptools-1.21.6-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-tlvh51ud.ecs' '--stdout=Microsoft-MIEngine-Out-q2a3xbzb.cgn' '--stderr=Microsoft-MIEngine-Error-qwnlclfo.0vx' '--pid=Microsoft-MIEngine-Pid-eynbcejp.wjf' '--dbgExe=C:\MinGW\bin\gdb.exe' '--interpreter=mi'
PS C:\Users\isido\Programaming\Cpp.vscode> ^C
PS C:\Users\isido\Programaming\Cpp.vscode>
PS C:\Users\isido\Programaming\Cpp.vscode> & 'c:\Users\isido.vscode\extensions\ms-vscode.cpptools-1.21.6-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-qocw5rvv.45o' '--stdout=Microsoft-MIEngine-Out-bmt0zdwc.oum' '--stderr=Microsoft-MIEngine-Error-5wd4qypy.io5' '--pid=Microsoft-MIEngine-Pid-xnov1iib.k1x' '--dbgExe=C:\MinGW\bin\gdb.exe' '--interpreter=mi'
PS C:\Users\isido\Programaming\Cpp.vscode>
#I started with c++, but i cant run "Hello Wolrd". It just wont run
116 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
Since you’re on Windows, it’s heavily recommended you use Visual Studio instead of Visual Studio Code. Visual Studio is a lot easier to set up and use especially for beginners
where do i find that
New here and looking to quickly get started with C or C++ on Windows? Follow the steps in this thread to compile and run your first bits of code in Visual Studio.
If you’re confused about anything don’t hesitate to ask
Ok thanks ill try that when im back on my computer
@unkempt estuary Has your question been resolved? If so, type !solved :)
Vs is even worse it wont even run and yes i have g++ installed
Did you follow the steps? I use MSVC as the compiler for Visual Studio and it works fine
really?
i did follow the steps
on vs code i get this
PS C:\Users\isido\Programaming\Cpp.vscode> & 'c:\Users\isido.vscode\extensions\ms-vscode.cpptools-1.21.6-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-gegcoo1f.bkq' '--stdout=Microsoft-MIEngine-Out-bop1fsww.1pr' '--stderr=Microsoft-MIEngine-Error-thjpjsan.iw0' '--pid=Microsoft-MIEngine-Pid-kcw1acz3.ubn' '--dbgExe=C:\MinGW\bin\gdb.exe' '--interpreter=mi'
PS C:\Users\isido\Programaming\Cpp.vscode> ^C
PS C:\Users\isido\Programaming\Cpp.vscode>
PS C:\Users\isido\Programaming\Cpp.vscode> & 'c:\Users\isido.vscode\extensions\ms-vscode.cpptools-1.21.6-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-zhnma1gz.kud' '--stdout=Microsoft-MIEngine-Out-cvzuccov.ps4' '--stderr=Microsoft-MIEngine-Error-3cyonl2n.k2q' '--pid=Microsoft-MIEngine-Pid-y5ibrqhn.zeg' '--dbgExe=C:\MinGW\bin\gdb.exe' '--interpreter=mi'
And on VS it just dosent run
VS should be easier to configure
I do think that VSC is better, but it's harder to configure, and VS is definitely not broken
If you want to continue with VSC, try to compile and run directly in the terminal first, and see if that works. You know how to do that?
No i do not
I can good it though
? You mean you can google?
Try g++ my_file.cpp to compile, then .\a.exe to run
Tell what happens
That works
But only in powershell
In VS Code the output gets sent into the debug console
Why does it matter?
You could uses tasks.json to run your executable, that would put it on the terminal
You want to manually compile your cpp project in vs code terminal, using g++, on your windows machine. Do I understand that all correctly?
If you are on Windows, VS really will offer you a vastly better experience if you take a little bit to learn its basics. But however you want to compile and run it, I can walk you through it if you need.
ok thanks
nonono
thanks
!solved
Thank you and let us know if you have any more questions!
This thread is now set to auto-hide after an hour of inactivity
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc.exe build active file",
"command": "gcc",
"args": [
"*.cpp",
"-o",
"${workspaceFolder}\\Build\\app.exe",
"-g",
"-Wall",
"-Wextra",
"-Wpedantic"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
This was my tasks.json file, this basically compiles all cpp files in the directory you run the task from, and then outputs an app.exe into a directory called Build
it also turns on some extra warnings that can be useful
IMO, I think it’s better to use vscode, visual studio tends to abstract away a lot of things and I personally found it more confusing then just creating all the build scripts myself, I have switched from visual studio to visual studio code
It was more learning but it was worth it
It also scares away a lot of people and really doesn't give any value when you literally learn nothing by setting up visual studio code other than "how to set up visual studio code"
Especially when you don't even need to know all of that to do anything because you'll need to use some kind of build system anyways instead of some crappy code runner/visual studio code tasks
The value is in knowing how to run the compiler from the terminal (and knowing what the terminal is!), in knowing what PATH is, and so on
Also your VSC knowledge applied to any OS and compiler, it doesn't lock you to Windows+MSVC
It’s not setting up visual studio code, you don’t set it up, you setup the compile scripts
You could use notepad doesn’t matter
And if people are getting scared of setting up vscode, are they really ready to program in c++?
if you are willing to go around and help people with it its fine
but saying "vsc setup better" isnt helping anyone, while recommending visual studio helps the beginner kickstart
and its a fact that gcc on windows sucks balls
and if something you should be recommending cmake with vsc because there is no real scenarion where vsc tasks are used
If my friend wanted to learn c++, I’d have him use vscode
I wish I used vscode
And I wasn’t just saying vscode was better
I was just saying I would prefer it as you get more experience with gcc
Visual studio is more confusing than vscode by a landslide
I think the build configuration in visual studio is atrocious
in vscode there is no build config so your point?
"I wish i did xy" these are the most pointless statements ever
im sorry but if they dont know what those are then setting up vscode wont help them
they will just blindly follow instructions until they work
if they cared about it they wouldnt use msbuild, sure
but they dont
they want to write and build c++ and they naively go into vscode because thats what they see online
Crap build system vs configuring your own from scratch, that’s my point
configuring what from scratch?
making a build script or vscode task is literally worthless because noone uses it
meanwhile msbuild is the default generator for cmake on windows
You have no underlying point, the most popular compiler in the world in gcc, my point is I think it’s best for beginners to fully learn the underlying ways build tools generate build scripts for compilers, that is my point, just how some people say they wish they learned c rather than c#
I’m not even talking about vscode, I’m just talking about any text editor
noone says they wish they learned C rather than C#
You are mistaken
nor vice versa so
This is a pointless argument at this point, I’ve fully made clear my point and it can’t get any clearer, I respect your opinion though
the only experience you need with running from the terminal is running your code once with g++ main.cpp -o main
literally anything else is wasted time
no my argument is that many people come here and say visual studio is crap and the guy asking should learn visual studio code
then they leave and the helpee doesnt progress one bit
setting up a shell script or something is just enforcing bad habits and its time spent that could be used for learning a build system that has cross platform support like cmake
Ok yeah I understand that, i didn’t mean crap, I just meant a little overcomplicated, there are hundreds of options that I’ve seen scare people away, when you make your own build scripts you fully understand everything that’s going on, because, well you built them
I do agree that MSBuild is dogshit but for these guys a gui based build system is much better than writing scripts
and really the only thing you need to change in msbuild is like the c++ standard because its on c++14 by default i think
Yeah, idk I’m just a little different ig, I really prefer writing my own. But I can def see why the majority of people prefer the gui
writing your own as in bash scripts?
Yeah
because thats hella janky and i would definitely consider using make or something at least (if you dont want to use cmake)
I’m using cmake
okay well then its not a bash script 
Well I run cmake via a script
okay but that script isnt your build system
as opposed to some people having a build.sh that invokes gcc and stuff
just get Visual studio
If you haven’t, check out CMake presets, you can run workflows now, so you probably won’t need a script anymore (just cmake —workflow —preset default
That’s cool, i will check it out, thanks!
What's wrong about it other than it being slow? I don't use it though, I use Clang 😛
Only if the instructions don't explain what they're actually doing
gcc isnt even that slow, if you have a high-core cpu you can multithread compiling
its considerably slower than msvc
idk i just did

the repo clearly states that it fails to build on windows 
thats not an msvc issue if they dont provide compat
what
i built it from cli with cmake too so

yes
oh wait imma try all too xd
but im pretty sure thats just the ALL project under vs
thats default on windows
and you dont need that for msvc anyways