Compile an external C file to an executable
BlitzMax Forums/BlitzMax Programming/Compile an external C file to an executable
| ||
How can it be done? I wrote a program that compiles BrainF*ck to C code, but it's not so useful if it can't compile the C to an executable. How can I do this through blitzmax? |
| ||
I believe the command is System_()? You would basically call a c compiler and pass it your C code, but then you would need to have a c compiler installed on your computer. System_("CCompiler MyProject.c") But why did you convert to C? Why not convert to BMax? Then you could just call the BMK compiler and not have to worry about having a c compiler installed. |
| ||
Nilium had made a TinyCC module but I can't find a working link. |
| ||
Actually you can comment out the Main function from the tcc source and import the c code directly. But the system_ is better if you just want to call the compiler. |