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:
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.





. 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(){}.
Reply With Quote
Bookmarks