Hi,
Thank you for the post. I seem to understand better now. But still I am not able to make it work. I think the real problem is exporting the symbol from the library. Actually this library is compiled in C++ so as per the documentation, I have to export it as extern "C". I am doing something wron I know.
let me explain my problem.
In my library I have a class called I_MountInterface. Now, I want to use this class in my main program using QLibrary. I am still not sure about how to call "symbol" in resolve method.
I did it in the following way:
Qt Code:
  1. I_MountInterface *mount;
  2. typedef I_MountInterface* (*MyPrototypeOne)();
  3. MyPrototypeOne myFunction = (MyPrototypeOne) lib.resolve(" new I_MountInterface");
  4. if (myFunction){
  5. mount = myFunction();
  6. }
  7. else std::cerr << "myFunction is not valid" << std::endl;
To copy to clipboard, switch view to plain text mode 

And I am not sure how to export I_MountInterface class as extern "C" in my library. For testing i did it like following in the constructor of I_MountInterface class in my library:
Qt Code:
  1. extern "C" MY_EXPORT I_MountInterface::I_MountInterface() {
  2. std::cout << "I am number 2" << std::endl;
  3. mountDriver = new I_MountDriver;
  4. }
To copy to clipboard, switch view to plain text mode 
Thank you