Results 1 to 5 of 5

Thread: Need a advise for building custom plugin with dependency

  1. #1
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows
    Thanks
    75
    Thanked 24 Times in 21 Posts

    Default Need a advise for building custom plugin with dependency

    Hello friends,
    I want to create a custom plugin for qtcreator and i did it successfully. (Qt 5 beta2). What i want to do now is to link this plugin with custom shared library which i created. What is the best way and safest way to do this? I want to use either plugin and library into my application and as i said the plugin needs library.

    Do i need to put my library into my plugin directory then build it or just give its build directory to plugin?

    Another Question:
    I have created a single library and in this library and in one filei get some properties of database connection from text file. I want to build this library.
    How can i give this text file for this library . This file must be visible to users.
    Should i just put this file beside dll and lib file?

    Thanks for useful hints
    Last edited by alizadeh91; 10th December 2012 at 17:06.

  2. #2
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows
    Thanks
    75
    Thanked 24 Times in 21 Posts

    Default Re: Need a advise for building custom plugin with dependency

    Any Suggestion for second part! :
    I have created a single library and in this library and in one filei get some properties of database connection from text file. I want to build this library.
    How can i give this text file for this library . This file must be visible to users.
    Should i just put this file beside dll and lib file?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Need a advise for building custom plugin with dependency

    You can put the file wherever you want where the library routine that needs it can find it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows
    Thanks
    75
    Thanked 24 Times in 21 Posts

    Default Re: Need a advise for building custom plugin with dependency

    Thanks Wysota
    I put the file beside the cpp file in library, and set the file path in cpp to currentPath. if i build the lib, is it enough to put the file beside the dll file whenever it is?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Need a advise for building custom plugin with dependency

    No. currentPath() returns the current working directory. The location of your DLL file is not related to the current working directory in any way. You can put the file in the same directory as the application binary and use QCoreApplication::applicationDirPath() though.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. The following user says thank you to wysota for this useful post:

    alizadeh91 (11th December 2012)

Similar Threads

  1. building mysql plugin
    By JeanC in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2011, 14:12
  2. Plugin to Plugin (lib) dependency
    By Wali in forum Newbie
    Replies: 2
    Last Post: 10th June 2010, 11:55
  3. building a plugin for MySql
    By pcaeiro in forum Installation and Deployment
    Replies: 2
    Last Post: 5th August 2009, 12:07
  4. building plugin for mysql?
    By triperzonak in forum Installation and Deployment
    Replies: 1
    Last Post: 25th June 2008, 09:57
  5. Replies: 7
    Last Post: 31st January 2007, 17:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.