Libraries needed, please help!!!

Berthold Hoellmann hoel at GermanLloyd.org
Mon Aug 2 11:23:53 EDT 1999


Sven Drescher wrote:
> Thanks!
> 
> But there are still errors.
> 
> My programm is very little, so I think, there are no syntax errors in it:
> 
> #include "Python.h"
> int main(int argc, char **argv)
> {
>   Py_Initialize();
>   PyRun_SimpleString("print 'Hallo, embedded world!'");
> return 1;
> }
> 
> Ok. I compiled and linked my program with the command:
> 
> CC -I/path/to/include/ -L/path/to/lib/ -o gui gui.cxx
> errors:
> undefined symbols ... first referenced in 'my_object_file.o'
> 
> The undefined symbols Py_Initialize and PyRun_SimpleString are still the
> error messages.
> What did I wrong?
> Can anybody send me the compiler-options for embedding needed object-files
> or other flags? Has anyone written a makefile, to do these work?

Order matters? Try:

CC -I/path/to/include/ -L/path/to/lib/ -o gui gui.cxx -lpython1.5

Good luck

Berthold
-- 
email: hoel at GermanLloyd.org
   )
  (
C[_]  These opinions might be mine, but never those of my employer.




More information about the Python-list mailing list