I have a f2.cpp file
// f2.cpp
I am using cygwin with the crosstool gcc compiler.
g++ -fPIC -c f2.cpp g++ -shared -o libf2.so f2.o
I have a libf2.so file. Now I want to call the f2 function in the f1 library (shared object) libf1.so.
This is f1.cpp and I want to take f1.so
// f1.cpp
How should I compile f1.cpp? I don't want to use dlclose, dlerror, dlopen, dlsym ... In the end, I want to use f1.so in main.cpp as a library of shared objects too ... without using dlclose, dlerror, dlopen, dlsym. How should I compile main.cpp when I have f1.so?
// main.cpp
source share