Compiling euler code with only link errors
This commit is contained in:
9
main.cpp
9
main.cpp
@@ -181,7 +181,7 @@ int main(int argument_count, char **arguments){
|
||||
test_intern_table();
|
||||
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
emit_line_directives = true;
|
||||
if(argument_count > 1){
|
||||
Scratch scratch;
|
||||
@@ -190,7 +190,9 @@ int main(int argument_count, char **arguments){
|
||||
String compiler_call = string_fmt(scratch, "clang.exe %s.c -g -o %s.exe", arguments[1], arguments[1]);
|
||||
String run_program = string_fmt(scratch, "%s.exe", arguments[1]);
|
||||
|
||||
String result = compile_file(name);
|
||||
Array<String> files = {scratch};
|
||||
files.add(name);
|
||||
String result = compile_files(files);
|
||||
FILE *f = fopen((const char *)c_filename.str, "w");
|
||||
assert(f);
|
||||
fprintf(f, "%.*s", (int)result.len, result.str);
|
||||
@@ -201,7 +203,7 @@ int main(int argument_count, char **arguments){
|
||||
|
||||
system((const char *)run_program.str);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
Scratch scratch;
|
||||
Array<String> files = {scratch};
|
||||
// files.add("lambdas.kl"_s);
|
||||
@@ -213,5 +215,6 @@ int main(int argument_count, char **arguments){
|
||||
// files.add("euler.kl"_s);
|
||||
String result = compile_files(files);
|
||||
printf("%s", result.str);
|
||||
#endif
|
||||
__debugbreak();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user