I have write a program to run python script [python2.4] under CentOS with Qt4.7
Qt Code:
  1. class QPython
  2. {
  3. private:
  4. QString strScript;
  5. public:
  6. QPython(){}
  7. QPython(QString _strScript)
  8. {strScript = _strScript;}
  9. ~QPython(){}
  10. int PythonInitialize()
  11. {
  12. Py_Initialize();
  13. return Py_IsInitialized();
  14. }
  15. int process_expression(char* cScript)
  16. {
  17. return PyRun_SimpleString(cScript);
  18. }
  19. void PythonFinalize()
  20. {Py_Finalize();}
  21. };
To copy to clipboard, switch view to plain text mode 
i have an error
mainwindow.o: In function `QPython::PythonInitialize()':
/root/Desktop/PythonInterpreter/QPython.h:20: undefined reference to `Py_Initialize'
/root/Desktop/PythonInterpreter/QPython.h:21: undefined reference to `Py_IsInitialized'
mainwindow.o: In function `QPython:: process_expression(char*)':
/root/Desktop/PythonInterpreter/QPython.h:25: undefined reference to `PyRun_SimpleString'
mainwindow.o: In function `QPython::PythonFinalize()':
/root/Desktop/PythonInterpreter/QPython.h:28: undefined reference to `Py_Finalize'
collect2: ld returned 1 exit status

i need to solve it, i search with google and i don't find the solution for it, i see the solution for DevC++.
Thanks Hany