I am using Eclipse to run C++. In my code,I use a High Level Embedding of Python to run a function. When I try to use sys and import it. I get the error:
Fatal Python error: no mem for sys.argv
CODE:
#include <python3.4m/Python.h>
#include <iostream>
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main(int argc, char **argv)
{
Py_Initialize();
PySys_SetArgv(argc, (wchar_t**)argv);
PyRun_SimpleString("import sys\n");
Py_Finalize();
return 0;
}
When I run the .exe from Terminal I get
ValueError: character U+384d2f2e is not in range [U+0000; U+10ffff] Aborted
Any help is appreciated in resolving this problem. Thank you.