DLL loading always goes wrong and the display fails to load

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.