#Compiler cant find file directory and code comes back as 1

37 messages · Page 1 of 1 (latest)

rich escarpBOT
#

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.

vernal stump
#

it should set things up so it runs the commands from that terminal, which will have all of the paths set correctly for you

vernal stump
#

add this to your settings.json:

{
  "terminal.integrated.profiles.windows": {
    "MSYS2": {
      "path": "C:\\msys64\\usr\\bin\\bash.exe",
      "args": ["--login", "-i"],
      "env": { "CHERE_INVOKING": "1" }
    }
  },
  "terminal.integrated.defaultProfile.windows": "MSYS2"
}
#

just update the path defined there for the terminal if it doesn't match where it is in your machine

stone dune
#

in Visual Studio Code

#

oh wait no I found it

#

Nah doesnt work

vernal stump
#

is it defaulting to the right terminal?

#

if you type g++ --version in the vscode terminal does it give you a valid version from msys2?

#

i'd restart it just to be safe. that setting might not take effect if you already have some other terminal open

stone dune
vernal stump
#

did you try following either guide i sent you in the other thread?

cyan heart
#

The command being run hasn't escaped arguments

#

So you'll have to fix that

vernal stump
#

yep that's prob it

#

try wrapping the paths in quotes

#

the spaces are prob messing it up

stone dune
#

or what?

#

I dont understand

vernal stump
#

the path with C++ Projektai in it

#

the spaces in that and in the hello world need to be quoted or the spaces need to be escaped in that path

#

what does your launch.json or tasks.json (whichever you're using) look like?

stone dune
cyan heart
#

look in tasks.json

#

or however you're building

stone dune
#

building?

cyan heart
#

building = compiling

stone dune
stone dune
#

!solved

rich escarpBOT
#

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