sublimetext

Sublime text on a usb driver, how do i set up on standalone gcc compiler?


I am trying to prepare a usb drive for use at school. I'll be compiling and running school work. I downloaded a portable version of Sublime Text https://www.sublimetext.com/download

and the standalone version of GCC https://winlibs.com/

Now, this is my setting for compiling on g++ on my linux and windows laptops. However, when I try to compile on my usb stick sublimetext, it says "gcc" is not in the path. I do have the standalone version of mingw on the same usb stick. Is it possible to point the g++ in my compile setting to the gcc on my usbstick?

Thanks!

{
    "shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\"",
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "working_dir": "${file_path}",
    "selector": "source.c, source.c++",

    "variants":
    [
        {
            "name": "Run",
            "shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""
        }
    ]
}

Solution

  • I used to have such problems, theses are some possible turnarounds: