Jump to content
  • Advertisement
Sign in to follow this  
Jimfing

C++ function binding

This topic is 4858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys - just found an interesting paper on binding C++ functions for scripting languages: http://www.drizzle.com/~scottb/gdc/fubi-paper.htm It uses the DLL exports from VC++ and name-unmangling to create a large table of all the functions which should be availible to the scripts. Pretty cool, although not cross-platform. Maybe someone would find it usefull...

Share this post


Link to post
Share on other sites
Advertisement
That's exactly how CPB that does function bindings for LUA. It doesn't use dbghelp though, it uses the more up to date DIA SDK, which was released shortly after Scott wrote that paper.

Thomas

http://www.thomasandamy.com/projects/CPB

Share this post


Link to post
Share on other sites
I do the exact same thing in a language I'm working on and it works great. However, I directly read out of the export table from the Portable Executable file (in memory) which the library is loaded from.

I imagine a similar thing can be done on any platform that supports dynamic libraries... which is all major ones, if I'm not mistaken.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!