Sublime Forum

C Build-Script: "make" not working

#1

Hi,

I’ve created the following buildscript for c:

{ "cmd" : "make"], "selector" : "source.c", "path" : "C:/mingw/bin/", "file_regex": "^(...*?):([0-9]*):?([0-9]*)", }

However, when I try to build it gives me this in the build-window:

[Error 2] The system cannot find the file specified [Finished]
I do have a Makefile in the same directory as the files I’m editing, and the Makefile does work for normal compilation in shell.

Note that the buildscript does work on one file when I make this my cmd:

"cmd": "gcc", "-Wall", "-std=c99", "$file"],

However, I would like to use my Makefile. Any ideas why this doesn’t work?

Also, how would I open my c exe after I compile it?

0 Likes

#2

bump :smile:

0 Likes

#3

bump2

Surely there’s a solution?

0 Likes

#4

bumparotamus :ugeek:

0 Likes

#5

BUMP_WITH_CROCODILES :ugeek:

0 Likes

#6

IIRC, MingW segregates utilities into their own folder.Try something like this instead:

{ "cmd" : "make"], "selector" : "source.c", "path" : "%PATH%;C:\\MinGW\\msys\\1.0\\bin;C:/mingw/bin/", "file_regex": "^(...*?):([0-9]*):?([0-9]*)", }

I seem to remember the name of the make executable was different too, but I’m not sure.

0 Likes

#7

Thanks a lot guillermoo. It works now!

0 Likes