Order matters... Say main.cpp is the example embedding code at http://docs.python.org/py3k/extending/embedding.html . Here is a wrong Makefile: test: a.out # Run python3.2-config --ldflags command to get required flags! PYTHON_LDFLAGS=-L/usr/lib/python3.2/config-3.2mu \ -lpthread -ldl -lutil -lm -lpython3.2mu \ -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions # Run python3.2-config --cf..