basic question on boost.python

jxu <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <[email protected]>
I just started to learn boost.python .  But I'm getting confused by the simplest
"hello world" example on the boost website:

Here's the C++ program:
char const* greet()
{
   return "hello, world";
}

and the wrapper:

#include <boost/python.hpp>
using namespace boost::python;

BOOST_PYTHON_MODULE(hello)
{
    def("greet", greet);
}

My first question is, which one is inside the "hello.cpp"?  Or both?
My second question is, shall I how to create a library that python can load? 
Shall I just type   "gcc -fPIC hello.cpp" ?  Thanks a lot!


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.