[Qt-interest] Regarding DLLs and plugins, QPluginLoader and QLibrary class

Patric userqt at gmail.com
Mon Jun 1 23:35:48 CEST 2009


Yes... I'll try to find more info about it. Thank you. 
And what about the QPluginLoader, 

QPluginLoader provides direct access to a root component object (instance()), instead of forcing you to resolve a C function manually.

does it means exactly that there is no need of resolving the symbols (a.k.a. the functions) ? 
  ----- Original Message ----- 
  From: Eric Clark 
  To: qt-interest at trolltech.com 
  Sent: Monday, June 01, 2009 11:25 PM
  Subject: Re: [Qt-interest] Regarding DLLs and plugins, QPluginLoader and QLibrary class


  Patric,

   

  When loading DLLs or Shared Objects dynamically (at run-time), you must resolve a pointer to any functions, classes, etc. that you would like access to in the DLL or Shared Object. At compile-time, the compiler does not know the signatures or location of any objects in the dll because it is not linked at compile time. Therefore, you must use the resolve function in the QLibrary class to get a function pointer to the "symbol" (aka an exported function) that you want to use in the library. If you do not know what symbols are exported from the library, you can use a program called Dependency Walker that will show every symbol that is exported from any DLL. Dependency Walker is free of charge, just google Dependency Walker.

   

  Does this help at all?

   

  Eric

   

  From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Patric
  Sent: Monday, June 01, 2009 3:17 PM
  To: qt-interest at trolltech.com
  Subject: [Qt-interest] Regarding DLLs and plugins, QPluginLoader and QLibrary class

   

  Hi all, 

  I have two simple questions here. 

  I'm reading the documentation of QPluginLoader http://doc.trolltech.com/4.5/qpluginloader.html#details, and I was wondering what does this means : 

   

  QPluginLoader provides direct access to a root component object (instance()), instead of forcing you to resolve a C function manually.

   

  And another question, while I was looking at QLibrary documentation http://doc.trolltech.com/4.5/qlibrary.html#load, more specifically http://doc.trolltech.com/4.5/qlibrary.html#resolve, 

  what do they mean by saying "symbol" ? 

   

  and resolve() to resolve a symbol in the library 

   

   

  I don't have experience with shared objects and maybe thats the reason I can't get it. I searched the net for a definition but I couldn't found a clear one. 

   

  Regards,

  Patric



  __________ Information from ESET NOD32 Antivirus, version of virus signature database 4098 (20090522) __________

  The message was checked by ESET NOD32 Antivirus.

  http://www.eset.com



  __________ Information from ESET NOD32 Antivirus, version of virus signature database 4098 (20090522) __________

  The message was checked by ESET NOD32 Antivirus.

  http://www.eset.com



------------------------------------------------------------------------------


  _______________________________________________
  Qt-interest mailing list
  Qt-interest at trolltech.com
  http://lists.trolltech.com/mailman/listinfo/qt-interest



  __________ Information from ESET NOD32 Antivirus, version of virus signature database 4098 (20090522) __________

  The message was checked by ESET NOD32 Antivirus.

  http://www.eset.com




__________ Information from ESET NOD32 Antivirus, version of virus signature database 4098 (20090522) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090602/559feef2/attachment.html 


More information about the Qt-interest-old mailing list