Hi there,
My code is :
#include <python.h>
int main(int argc, char *argv[]) {
Py_Initialize();
PyRun_SimpleString("from time import time,ctime\n"
"print 'Today is',ctime(time())\n");
Py_Finalize();
return 0;
}
I do link the python27.lib in project Build Options
but I get this link error:
Compiling: src\main.cpp
Linking console executable: bin\Release\PythonBind.exe
obj\Release\src\main.o:main.cpp:(.text.startup+0x10): undefined reference to `_imp__Py_Initialize'
obj\Release\src\main.o:main.cpp:(.text.startup+0x25): undefined reference to `_imp__PyRun_SimpleStringFlags'
obj\Release\src\main.o:main.cpp:(.text.startup+0x2b): undefined reference to `_imp__Py_Finalize'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 0 warnings
It's like it doesn't link the lib but it found the file 'cause when I put another non-existent lib It tells me that can't be found
Please any help, What do I miss?
Thanks in advance for any help
Greetings