I found a similar question from the Internet, the specific content is as follows
Created an MFC shared-link library with only such an addition
_declspec (dllexport) int add (int a,int b) {
return a+b;
}
Then create an MFC EXE, select the dialog box, add a button, the event inside
extern int Add (int a,int b);
void Cdlltestdlg::onbnclickedbtnadd ()
{
CString str;
m_xx= Add (1,35);
UpdateData (FALSE);
}
Now the problem is click Build-Build Solution, in the project directory under the Dug, click on the generated EXE file to run correctly,
But in vs2010, pressing F5 will prompt you:
The answer on the Internet is this:
DLL and the actually called Project, all in the same solution, I removed the DLL project.
Then I will follow this content to operate, the results will be immediately.
The tragic thing is still back, I want to reproduce the error type: Result I reload the project, the error does not appear, there is a chance that everyone can experiment, in short, dynamic link library is not good to do AH!!!!!
DLL loading always goes wrong and the display fails to load