how to call std_stdio_static_this from a dynamically loaded shared library (osx)

Jacob Carlborg doob at me.com
Wed Oct 3 05:00:02 PDT 2012


On 2012-10-03 08:56, timotheecour wrote:
> Thanks for the links. Ya, I did see those threads and I understand there
> are limitations with dynamic load shared libraries, however, your answer
> is not very helpful. We shouldn't have to wait until they get 100%
> support to start using them (who knows when that happens); some
> applications just require them (eg writing matlab mex files).

Yeah, it may not have been so helpful, sorry.

> In the meantime, the workaround I described above seems to adequately
> address the IO problem in shared libraries, it's just that it requires
> hacking inside std.stdio. So I'm just wondering whether I should:
> * pull those changes back in phobos
> * or if there's an alternative way of doing this

Module constructors if one of the things that don't work properly. I 
don't know exactly how this works in std.stdio I would need to study the 
code. If I recall correctly std.stdio uses some kind of hack to avoid 
circular dependencies that can otherwise occur if two modules, both 
having module constructors, import each other.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list