Interrogate tool

hmm very strange. I’ve check the libstdc++ installed on my computer, and they all answer to the GLIBCXX_3.4.11 version when I launch : “strings libstdc++.so.6 | grep GLIBC”

But not the one in ~/.panda3d/hosts/localhost_a5557f12ad24718f/cmmPackage/

So where come from that lib ?

I try to force to include /usr/lib/libstdc++.so.6 in package with the file() function, but it says me it was shadowing one in ~/.panda3d/hosts/runtime_****/panda3d/cmu_1.7/

Ok so it was the one downloaded from panda3d.

So, what to do ?

Hmm, the one from panda3d was compiled on an Ubuntu Hardy chroot, so it may be an option for you to debootstrap a hardy chroot and compile it there. Other than that, I don’t know if there’s an easy way to link to a different stdlibc++.

I confess that it could be nice to link it with my version of libstdc++ instead of deboostrap…

But thanks rdb for the idea, it may be a “last resort solution”.

Hi again !
I’ve successfully built panda3d locally, and now it seems to be working fine. I’ll probably come back on this when deploying the application, but it sounds good for now. thank you both for the help :wink:

I still have a question though: I’ve read on the forum that namespaces might not be handled by interrogate, but it’s on a post from 2005… Is this still true? so far, everything I use inside namespaces is ignored by the parser. any idea how to solve this in a clean way ?
I’m thinking to a macro NAMESPACE which would be converted as a comment or as “namespace” depending on the context; I tried this one, but not very successfully due to it’s limitations : drdobbs.com/184401344 .

My “not-so-clean” solution right now is to add a new wrapping class in global scope that handles this, but that forces me to “duplicate” my classes… Except for that, I must admit that the tool is fairly easy to use once you get to understand how it works ! great job there. Much easier and lighter than swig for example.

Vash

At the time we originally wrote interrogate, we were targeting Panda for compilers that didn’t support namespaces. So we wrote Panda without reliance on namespaces, and therefore we never needed to add that support to interrogate.

So, if you want to use namespaces in your code, your two choices are (a) add the required support to interrogate, or (b) use a hack such as you describe.

David

a) was beyond my skills, so I went for the minimal effort solution and just added a macro in dtoolbase_cc.h which is as follow (just for the record) :

#ifdef CPPPARSER
#define NAMESPACE(spacename)
#else //CPPPARSER
#define NAMESPACE(spacename) namespace spacename
#endif //CPPPARSER

and then I just use NAMESPACE(xxx) instead of namespace xxx in my code. It seems to be working: exporting and calling the method both work.