Install went OK, but cant compile anything

Hello, this is my first post. I do want to start develop using panda3d, I was able to install the sdk on my kubuntu oneiric ocelot amd64 (i5 laptop), solved all dependencies and got it installed.
I had tried many times to compile the HelloWorld but only got undefined references, the command lines are:
g++ -O2 -fPIC -I/usr/include/panda3d -I/usr/include/python2.7 -c HelloWorld.cxx

g++ -O2 -fPIC -lp3framework -lp3glstuff -lp3ptloader -lp3rocket -lp3vision -lpandaai -lpandagles2 -lpandagl -lpandagles -lpandamesa -lpandaode -lpandaphysics -lpandaskel -ltinydisplay -lpandabullet -lpandaegg -lpanda -lpandafx -lpandaexpress -lp3dtoolconfig -lp3dtool -lp3pystub -lp3direct -L/usr/lib64/panda3d HelloWorld.o -o HelloWorld

the HelloWorld.o file is produced but when linking, even with all libraries found on /usr/lib64/panda3d, the result is undefined references such as:

[list=]HelloWorld.o: In function _Z13register_typeR10TypeHandleRKSsS_.constprop.376': HelloWorld.cxx:(.text+0x1d): undefined reference toTypeRegistry::ptr()’
HelloWorld.cxx:(.text+0x2b): undefined reference to TypeRegistry::register_type(TypeHandle&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' HelloWorld.cxx:(.text+0x40): undefined reference toTypeRegistry::ptr()’
HelloWorld.cxx:(.text+0x50): undefined reference to TypeRegistry::record_derivation(TypeHandle, TypeHandle)' HelloWorld.o: In functionSocket_IP::get_type() const’:
HelloWorld.cxx:(.text._ZNK9Socket_IP8get_typeEv[Socket_IP::get_type() const]+0x3): undefined reference to Socket_IP::_type_handle' HelloWorld.o: In functionSocket_IP::~Socket_IP()’:
HelloWorld.cxx:(.text._ZN9Socket_IPD2Ev[_ZN9Socket_IPD5Ev]+0x40): undefined reference to TypedObject::~TypedObject()' HelloWorld.cxx:(.text._ZN9Socket_IPD2Ev[_ZN9Socket_IPD5Ev]+0x33): undefined reference toTypedObject::~TypedObject()’
HelloWorld.o: In function `Socket_IP::force_init_type()’:[/list]

Since I had installed the version 1.8 and also the devel version and still cant seen to find whats is wrong, I ask here, what can I try to correct this?

Thank you very much.

I did not find the solution, but I was able to compile source code on precise pangolin (kubuntu 12.04), just had to disable libfftw (same kind of unresolved symbols).

Maybe this is can be a ubuntu packaging bug, if anyone has a clue I would like to know.

Edit: Forgot to mention the most important, I was able to compile HelloWorld against the version installed in precise pangolin.

Carlos, could you post here the steps you took to build from source, please?