Writes code to file and compiles
write_and_compile.RdThis function accepts the code that was written by generateCode, possibly changed by the user. It writes the contents to a c file named 'modelName_gvf.c'. This file is compiled to './modelName.so'.
Details
This entire function can be replaced with a call to cat() and
then compiling the written file in the system's shell (or via
checkModel)
Examples
cCode <- generateCode(m,o) # a character vector
#> Error in generateCode(m, o): unused argument (o)
modelName <- write_and_compile(cCode) # commented name
#> Error in eval(expr, envir, enclos): object 'cCode' not found
print(comment(modelName))
#> Error in eval(expr, envir, enclos): object 'modelName' not found