Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Static TLS problem when loading dynamic library

This thread is locked; no one can reply to it. rss feed Print
Static TLS problem when loading dynamic library
imKanth
Member #15,928
April 2015

Hi all !

I'm pretty new to Allegro (i start using it 2 days ago) and now i need you're help to resolve a little(big) problem i have.

I'm in a project that need to load dynamically some libraries at run-time.
The project consist in creating a plugins handler. (actually a snake game, with plugin for the display part). So i created 3 libraries that make reference to graphics libraries to make the display work with 3 graphics libraries.
After having implemented a run-time plugins switch in my program. I saw that when i try to open the plugin that use Allegro, a crash happened and i got this error :
- dlopen: cannot load any more object with static TLS

My question is: why ?
My friend on the same project use the same system of run-time plugin switch and don't have any error. So i suppose that my implementation of Allegro is failing somewhere but i don't know which library is load statically in Allegro, so i can't understand my error.

I let you my Object that encapsulate Allegro's functions (http://pastebin.com/P8WkbYbx) and hope someone can help me to solve this problem.

If you need more precision i'm here !

imKanth

beoran
Member #12,636
March 2011

http://stackoverflow.com/questions/14892101/cannot-load-any-more-object-with-static-tls

Looks like a subtle problem with the way Allegro is being built...

Go to: