Skip to content

Commit

Permalink
I think compilation is now fixed on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Martín del Río committed Mar 12, 2019
1 parent 2dd90a3 commit 504a109
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/ldpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,13 @@ int main(int argc, const char* argv[])
}
if(final_filename.size() == 0) final_filename = "ldpl-output";
final_filename += "-bin";
string compile_line = "c++ ldpl-temp.cpp -std=c++11 -o " + final_filename;
cout << "LDPL: Compiling..." << endl;
string compile_line = "c++ ldpl-temp.cpp -std=gnu++11 -o " + final_filename;
int compiled = system(compile_line.c_str());
system("rm ldpl-temp.cpp");
if(compiled == 0){
cout << "\033[35;1mLDPL: file(s) compiled successfully.\033[0m" << endl;
cout << "*\033[32;1m File(s) compiled successfully.\033[0m" << endl;
cout << "* Saved as " << final_filename << endl;
}else{
error("compilation failed.");
}
Expand Down
6 changes: 3 additions & 3 deletions src/lib-to-string.awk
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ BEGIN{
print "void add_ldpllib(compiler_state & state){";
}
{
gsub("\"", "\\\"", $line);
gsub("\\n", "\\\\n", $line);
print " state.add_var_code(\"" $line "\");";
gsub("\"", "\\\"", $0);
gsub(/\\n/, "\\\\n", $0);
print " state.add_var_code(\"" $0 "\");";
}
END{
print "}";
Expand Down
2 changes: 1 addition & 1 deletion src/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LDPLSTD = 19 #LDPL Standard
OBJS = ldpl.o
SOURCE = ldpl.cpp
OUT = ldpl
FLAGS = -g -c -Wall -std=c++11 -fpermissive -DVERSION=$(VERSION) -DSTANDARD=$(LDPLSTD) -DCOMPILEDATE='"$(shell date)"'
FLAGS = -g -c -Wall -std=gnu++11 -fpermissive -DVERSION=$(VERSION) -DSTANDARD=$(LDPLSTD) -DCOMPILEDATE='"$(shell date)"'
LFLAGS = -static-libgcc -static-libstdc++

all: $(OBJS)
Expand Down

0 comments on commit 504a109

Please sign in to comment.