Runtime loading

Dag-Erling Smørgrav des at des.no
Mon Sep 13 17:02:49 PDT 2004


Maxime Henrion <mux at freebsd.org> writes:
> db wrote:
> > In my C++ program I need to load some files/classes at runtime, so
> > that users can add "plugins" without recompilling my program. What
> > functions should I use? I'm using FreeBSD 5.3-beta2 btw.
> I'm not sure about C++, though I guess you could use the same functions as
> in C.

dlopen() etc. work just fine in C++.  Beware of name mangling issues,
though; you might not be able to load plugins compiled with a
different compiler.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-hackers mailing list