Hi
I using Linux Ubuntu 16.10 and IDE Code Blocks to build my wxWidgets application. I have already installed python 2.7 in the Ubuntu system. In Code Blocks build settings under search directories for compiler and linked i have set the python Path.
I am using some python API like Py_Initialize, PyImport_Import, PyModule_GetDict ect.
When i compile am getting compilation errors saying undefined reference to those APIs
Please let me know how i can solve this compilation error.
Ubuntu system has python in usr folder and i have downloaded 2.7.13 is that a problem.
How to link python correctly in CodeBlocks.
Thanks & Regards
Priya
Compiling issue on Ubuntu when i use python APIs
Re: Compiling issue on Ubuntu when i use python APIs
That sounds like you didn't link the python libraries to your project.
Use the source, Luke!
Re: Compiling issue on Ubuntu when i use python APIs
Hi,
Under linker settings i have added 'lpython2.7'
and i have given the path under search directories
Please let me know how i will link python in Code Blocks
Thanks & Regards,
Priya
Under linker settings i have added 'lpython2.7'
and i have given the path under search directories
Please let me know how i will link python in Code Blocks
Thanks & Regards,
Priya
Re: Compiling issue on Ubuntu when i use python APIs
Just do be clear: Do you get compiler errors or linker errors?
If they are compiler errors, you didn't include the header file for these functions.
If they are linker errors, you didn't link to the correct lib(s).
As i don't work under Linux, i can't tell you exactly which headers or libaries you need, but that should be easy enough to Google.
If they are compiler errors, you didn't include the header file for these functions.
If they are linker errors, you didn't link to the correct lib(s).
As i don't work under Linux, i can't tell you exactly which headers or libaries you need, but that should be easy enough to Google.
Use the source, Luke!