Sublime Forum

MinGW(g++) project automation (windows)

#1

Before I had a Build System to help me compile SFML 2.0 through sublime text.

[quote]{
“cmd”: “g++”, “$file_name”, “t_game.cpp”, “-o”, “$file_base_name.exe”, “-Lc:/SFML/lib”, “-Ic:/SFML/include”, “-DSFML_STATIC”, “-lsfml-main”, “-lsfml-graphics-s”, “-lsfml-window-s”, “-lsfml-system-s”, “-mwindows”, “-static-libgcc”, “-static-libstdc++”],
“selector”: “source.cpp”
}
[/quote]

For the most part it worked, but I got tired of trying to find this file and manually adding files to the project. So I created a sublime project which forces python to execute g++ through cmd.exe and add each project .cpp file to the command for executing. This is my first plugin so check it out and give me feedback. Note: I tried using subprocess.Popen(), but the outcome wasn’t smooth unfortunately. Also ran into an issue where the array wasn’t resetting everytime I ran the command so I had to just do a check so it would stop adding to the array if the url already exists. Not sure if that’s a sublime bug though.

Anywho enjoy: github.com/Lamonte/MinGWBuild

0 Likes