compiling an embedding python 3.5 in a visual 97 windows c program -
i trying create program using c , python. attempting do, create plots dynamically. plot programs i've found require file or static source. python part want create have api able use c program wish create.
an earler request helped me find correct python libery (i needed download python again). thank much. added path library , compile error.
i error of:
c:\python35\libs\python35_d.lib : fatal error lnk1106: invalid file or disk full: cannot seek 0x5666a758
i using microsoft developer studio 97 include directories are:
c:\program files (x86)\devstudio\vc\include c:\program files (x86)\devstudio\vc\mfc\include c:\program files (x86)\devstudio\vc\atl\include c:\python35\include
the library directories are:
c:\program files (x86)\devstudio\vc\lib c:\program files (x86)\devstudio\vc\mfc\lib c:\python35\libs
the source directories are:
c:\program files (x86)\devstudio\vc\mfc\src c:\program files (x86)\devstudio\vc\mfc\include c:\program files (x86)\devstudio\vc\atl\include c:\program files (x86)\devstudio\sharedide\help
the program code example given in python 3.5 tutorial:
#include "python.h" int main(int argc, char *argv[]) { wchar_t *program = py_decodelocale(argv[0], null); if (program == null) { fprintf(stderr, "fatal error: cannot decode argv[0]\n"); exit(1); } py_setprogramname(program); /* optional recommended */ py_initialize(); pyrun_simplestring("from time import time,ctime\n" "print('today is', ctime(time()))\n"); py_finalize(); pymem_rawfree(program); return 0; }
you trying link modern (possibly 64 bit?) library python35_d.lib using tool-chain 1997. highly probable antique linker not process newer library file.
update tool-chain free visual studio 2015 community edition , enjoy benefits of 21st century!
even newer tool chain need make sure build type (64 or 32 bit) matched library linking.
Comments
Post a Comment