Hello,
I am very close to tear all my hairs out. I have been trying to resolve the functions from my custom dll but so far, no luck.

Here is the template I use:

Qt Code:
  1. QLibrary library("E:/QT_works/myDll.dll");
  2.  
  3. if(library.load())
  4. qDebug()<<"Loading done";
  5.  
  6.  
  7. typedef void (*MyPrototype)();
  8. MyPrototype myFunction = (MyPrototype) myLib.resolve("myFunction");
  9. if (myFunction)
  10. myFunction();
To copy to clipboard, switch view to plain text mode 

Loading is successful. However, symbols cannot be resolved.
I used debugger and after the myLib.resolve step, the following error appears on the window where name and values are shown;

bq. errorString "Cannot resolve symbol "myFunction" in E:/QT_works/myDll.dll: The specified procedure could not be found." QString

I also used
Qt Code:
  1. HINSTANCE hDLLFeX;
  2. hDLLFeX=LoadLibrary(L"myDll.dll");
  3. if(hDLLFeX)
  4. qDebug()<<"LOAD SUCCESSFUL";
  5.  
  6. MyPrototype myFunction = (MyPrototype) GetProcAddress(hDLLFeX, "myFunction");
To copy to clipboard, switch view to plain text mode 
Both return a null pointer.
It's obvious that I cannot find the function declared in the library source file, but I guess I used correct syntax when declaring my function. What I used was

Qt Code:
  1. extern "C" {
  2. ...
  3. void myFunction(int,int)
  4.  
  5. }
To copy to clipboard, switch view to plain text mode 
It's good to mention that the same dll was used by someone else earlier in VS 6.0.

I also downloaded DependencyWalker and check the names of the functions inside myDll.dll. I noticed something which seemed to be interesting. The name of the function which dependencywalker shows is _Z8myFunctionPd, _Z8 in front and Pd at the end of the function. I guess it shouldn't be a problem.
I am not sure if I should resolve the symbols by the name shown in dependencywalker or the original name declared in extern "C".

I am hoping someone might be able to help me.

Thanks