Quote Originally Posted by spud View Post
Check that:
  1. Compiling MyLibrary generates MyLibrary.lib and MyLibrary.dll
  2. Load Mylibrary.dll with depends.exe to see that your function has been successfully exported.
  3. Ensure that your makefile/.vcproj links to MyLibrary.lib


The last step is done by adding the following to the .pro file of DLL 2
Qt Code:
  1. LIBS += -L<PathToLib> -lMyLibrary
To copy to clipboard, switch view to plain text mode 
Thanks!!

I forgot to link to DLL1 when building DLL2. It works now.