Since you are also allegedly using 'extern "C"', everything is
correct then. But since you can't load the "component", you must
be doing something wrong.
Your guess is likely wrong, and your problem is elsewhere.
There are absolutely no issues doing the above (provided correct
'extern "C"' is used).
Begin by verifying that libmpeg2* loaded at runtime in fact do
define the symbols that the loader says are missing.
env LD_DEBUG=files /path/to/exe
Above will tell which libmpeg2*.so.0 are loaded (they may not be
the ones you expected).
objdump -T /path/to/libmpeg2*.so.0 | grep insert-unresolved-symbol-name-here
The symbols you desire may not be exported, or they may be hidden.
Posting the error message you get from dlerror() may provide clues as well.
Finally, running with LD_DEBUG=symbols,bindings should give you a lot more info.
The '-rdynamic' above is useless (but harmless).
It is better to use '-pthread' at compile and link, than to link with -lpthread.
Otherwise, I do not see anything wrong with the link line.
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.