I've created a .so file called car.so. I would like to test and work with this library in a test.cc code . In the command line i would like to compile: g++ test.cc -o test. I don't want to also link (include) the library car.so.
How to do that?
My test.cc code looks like this:
void* handle = dlopen("/home/v3/car.so", RTLD_LAZY); Car* (*create)(); void (*destroy)(Car*); create = (Car* (*)())dlsym(handle, "create_object"); destroy = (void (*)(Car*))dlsym(handle, "destroy_object"); Car* carr = (Car*)create(); carr->brake(); destroy( carr ); I would also like to ask if it's possible to include 3 .so file in a single .so file.
edit:
I am working on Ubuntu/Linux