tautology's blog

By tautology, history, 4 months ago, In English

I was using inbuilt C++ single file build, but then I found it was using C++98. Later then I tried using this build and many others builds which I found on the web. But the issue is something else. Now I'm getting the following win-error :
Screenshot-101

Can anyone please help me out.

 
 
 
 
  • Vote: I like it
  • -2
  • Vote: I do not like it

»
4 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I am not really experienced with Sublime Text, but I can see that you are using Windows 10, and in the script there is an argument called "bash". I suppose the script is for Linux and stuff, not Windows 10.

Maybe try changing "bash" with something like "cmd.exe" (and remove the "-c" parameter), or completely delete anything before "g++".

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'm using a new build for windows from here, now I'm getting this error

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Well at this point I suggest you learn how to write a build script yourself, without trying to copy anyone else's, or you might as well look for some video tutorials to have better visual demonstrations.

      IIRC, there isn't such thing as FILE_BASE_NAME in Sublime Text. Back then I used "${TM_FILENAME/(.*)./$1/g}" for the file name without extensions.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it
  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    g++.exe: error: unrecognized command line option '-std=c++17'

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Then change it to "-std=c++14" or "-std=c++11", the error is there because you don't have C++17 on your local machine.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Refer to this link.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Install MinGW for c++ and set the environmental variable path.(google it if you dont know how)

then install sublime and install package manager in sublime(google it if u dont know) .After that, press clt+alt+p ->goto "install package", then from the list search "minghang", you will find "minghang yang c and c++ build ", install it.

Now open any cpp file and for the first time press clt+alt+b and select c++ build and run. From then you can just press clt+b and it will compile and run.

And for competitive programming, I strongly suggest this Cppfastolympic package. It is the best and very useful for input/output.