Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Abominus

Loading shared obj implicitly

This topic is 6083 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

Advertisement
quote:
Original post by Abominus
What''s the unix/linux equivalent of the win32 LoadLibrary/
GetProcAddress api calls (if they exists)?


Never mind that. I''ve found it. But...

Is there an initialisation function or address in the so (sort of like DllMain in Windows) that is called when the dll is loaded?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Abominus
[quote]Original post by Abominus
What''s the unix/linux equivalent of the win32 LoadLibrary/
GetProcAddress api calls (if they exists)?


Never mind that. I''ve found it. But...

Is there an initialisation function or address in the so (sort of like DllMain in Windows) that is called when the dll is loaded?

void _init() is called when you dlopen() a module (or when it is loaded dynamically by the loader), void _fini() is called when you dlclose() it. A default implementation is supplied so that you don''t have to write them. You can, however, override them if you want.

Hope this helps.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!