2

I have written a program which has a few cpp, python source files and csv files which are used for input and output between programs(one program file generates a .csv for input to another program file). The user additionally has to write 3 csv files as input to the whole program as a start as these inputs are huge since its a timetable generator program, which needs the university data as initial input. Can I make an executable out of this program structure?

zeus
  • 23
  • 5

1 Answers1

0

You can compile and link all cpp file into a single executable and also embed your python file in this program using Python C API.

#include <Python.h>
int main(int argc, char *argv[])
{
  Py_Initialize();
  PyRun_SimpleString("This is the content of your python files");
  Py_Finalize();
  return 0;
}

You can also compile your static csv files as long strings or resource files inside the executable.

Community
  • 1
  • 1
gdlmx
  • 6,479
  • 1
  • 21
  • 39