-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.cpp
More file actions
20 lines (20 loc) · 708 Bytes
/
Copy pathbuild.cpp
File metadata and controls
20 lines (20 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include<bits/stdc++.h>
using namespace std;
int main(int argc,char* argv[]) {
for(int i = 1 ; i < argc ; i++) {
string fileName = argv[1];
string cmd;
cmd = "g++ -Isrc/include -c " + fileName + ".cpp";
system(cmd.c_str());
cmd = "g++ " + fileName + ".o -o " + fileName + " -Lsrc/lib -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system icon.res";
system(cmd.c_str());
cmd = "del " + fileName + ".o";
system(cmd.c_str());
cmd = "move " + fileName + ".exe Builds > NUL";
system(cmd.c_str());
cmd = "cd Builds && call " + fileName + ".exe";
system(cmd.c_str());
system("cls");
}
return 0;
}