Newbie - C API Question
Ian Pellew
ipellew at pipemedia.co.uk
Mon Apr 14 21:36:39 EDT 2003
Hi;
This is my first attempt at getting to and from my C world.
I cannot get past Python Reference Manual(2.2.1) section 1.2.1.1 :-
h.c:-
#include "Python.h"
main() {
int x;
PyObject *t;
t = PyTuple_New(3);
x = Py_file_input;
printf("Hiya, x = %d\n", x);
}
My compile gives:-
[ `gcc -I/usr/local/include/python2.1 -o h h.c` ] && { ./h; }
Undefined first referenced
symbol in file
PyList_New /var/tmp//ccNWkGt5.o
ld: fatal: Symbol referencing errors. No output written to h
collect2: ld returned 1 exit status
I am on Sun Solaris 5.8
Python 2.1.1 (#1, Aug 25 2001, 04:19:08)
[GCC 3.0.1] on sunos5
Any pointers/advice please;
Regards
Ian
More information about the Python-list
mailing list