Link the .so library dynamically. I can not find how to use the functions of the .cpp-files from which this library is assembled.
- Why can not find, or how were you looking? - 0xdb
- everything is just everything ... I thought there was something for this in the standard library ... I have never come across - xperious
- "there is something in the standard library for this" - for what purpose? - 0xdb
- to import / export functions from so-shki - xperious
|
1 answer
like that:
void* handle = dlopen(path.c_str(), RTLD_LAZY); if (!handle) const char* err = dlerror(); pfunc func = (pfunc)dlsym(handle, "func"); func() dlclose(handle); - hmm, thought for c ++ there is something else - xperious
- Well, there are wrappers for this, for example, POCO - Rikitikitavi
- well, thanks, perhaps I’ve got boost.dll - xperious
|