Results 1 to 14 of 14

Thread: Any .dll Tutorials?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    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
    Of course you can write DLL that export simple functions.
    Most of the WINAPI is done that way.
    In your example from the beginning of this thread it seems you also managed to build a dll which only exported a simple function - so I am confused as to what you wrote here.
    It never worked. It compiled but never spat out Hello World. So basically after reviewing a bunch of sources, I noticed that every .dll ever created in these examples had functions as part of a class. The hidden this pointer was from here:

    http://www.learncpp.com/cpp-tutorial...-this-pointer/

    But I hadn't read it in a while and now that I refreshed my memory, it doesn't seem to be of relevance in this case so my mistake.

    But looks like I've managed to add the library without errors using the -L -l method. For some reason if I do something like:

    Qt Code:
    1. LIBS += "C:/Users/MyUser/Docs/MyDLL.dll"
    To copy to clipboard, switch view to plain text mode 

    The program exits with ".exe exited with code -1073741515" which basically says that the library wasn't found at least according to what I found on this forum.

    But having added the library, I don't get a QDebug Hello World message as expected . Even though I can find the function in the hints box when I start typing the name of the function and it's at the start of main(){}.

    What's more, if I add the HelloWorld() function in my .dll to namespace mynamespace and then call it in main of my program as mynamespace::HelloWorld(), I get an error:

    error: undefined reference to `_imp___ZN14...' and that doesn't have many hits in google.
    Last edited by Atomic_Sheep; 11th October 2017 at 13:12.

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.