Results 1 to 14 of 14

Thread: Any .dll Tutorials?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Jun 2011
    Posts
    203
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    7
    Thanked 4 Times in 3 Posts

    Default Re: Any .dll Tutorials?

    Quote Originally Posted by high_flyer View Post
    While reading on function pointer is certainly good, I'd like to point out that this is not the usual way shared libs are used, even-though, its one way to use them - however, it is very cumbersome, whats more, if your libs get extended, you will have to edit your code that extract the functions from your DLL - so not that recommended for regular cases.
    Ah didn't think of this. But looks like the code that is provided in:

    https://wiki.qt.io/How_to_create_a_l...an_application

    won't need much changes if the .dll is modified? You're loading the same .dll and if you're calling a function by ->resolve, you still need the function to be there in the .dll. I'm obviously missing something.

    Quote Originally Posted by high_flyer View Post
    Usually you specify in your build configuration (I suppose you use qmake in this case, so it will be the LIBS qmake variable) which libs (DLLs) you are linking to, and the linker does the job for you.
    I tried doing it this way before - that's when I posted that message regarding disregard because I stumbled onto an alternative solution i.e. using QLibrary, but got nowhere. I must have missed something somewhere, but my code resulted in no qDebug hello world statement. That was another reason why now I'm trying to use the QLibrary code. That and the fact that it's cross platform. I'm sure it's possible to write code this way that's cross platform as well, but I figure it will require slightly more digging to get everything to work. I was kind of hoping with QLibrary, I wouldn't have to do any additional digging and just have code that does what I want it to.

    EDIT: Tried doing it the conventional way again, but not getting anything spat out in qDebug so nothing has changed from my previous attempts.
    Last edited by Atomic_Sheep; 5th October 2017 at 09:20.

Similar Threads

  1. Qt Tutorials
    By vivaladav in forum Qt Programming
    Replies: 3
    Last Post: 24th November 2016, 11:56
  2. QT tutorials
    By T3AB4GG3R117 in forum Newbie
    Replies: 6
    Last Post: 20th April 2016, 15:49
  3. New C++ tutorials at MEGA C++ tutorials
    By studentri23 in forum General Programming
    Replies: 2
    Last Post: 15th December 2012, 15:44
  4. Tutorials
    By SharonAngel in forum Newbie
    Replies: 1
    Last Post: 30th November 2010, 12:23
  5. I can't see the code in the Qt Tutorials
    By choucete in forum Newbie
    Replies: 1
    Last Post: 3rd February 2009, 00:31

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.