Home > OS >  DLL dynamic link library file is generated by vs2013 (def module definition file is used to derive t
DLL dynamic link library file is generated by vs2013 (def module definition file is used to derive t

Time:10-04

See Sun Xin teacher explained the process of the dynamic link library lesson19, one way is by def the module definition file to export documents, to avoid name, according to his practice, my actual operation again
1. The first built a win32 DLL empty project Dll3
2. Join. CPP file
Int the add (int a, int b)
{
Return a + b;
}
Int subtract (int a, int b)
{
Return a - b;
}

3. Add def files Dll3. Def

4. Edit Dll3. Def
The LIBRARY

EXPORTS
Add
Subtract
5. Click generate Dll3
6. The result error error message is as follows:

2 cannot resolve the error and error LNK1120: external command F: \ projects \ DLL \ Dll3 \ Debug \ Dll3 lib Dll3
2 cannot resolve the error and error LNK1120: external command F: \ projects \ DLL \ Dll3 \ Debug \ Dll3 lib Dll3
Error 56 error LNK2001: cannot resolve the external symbol of subtract F: \ projects \ DLL \ Dll3 \ Dll3 \ Dll3 def Dll3 1 1

7. I checked the reasons, it added new Dll3. DLL doesn't need the properties - "connector - input -" "- the module definition file (" in have Dll3. Def
Add existing Dll3. DLL requires in attributes -- - "connector -" input - "- the module definition file (" in have Dll3. Def
Errors in the results appeared 6.
8. When I put the attribute - "connector - input -" "- the module definition file" in the DE Dll3. Def remove
Can generate, but generated will appear after 9. The problems in the
9. After generated, CD in the command prompt to the relevant folder F: \ \ project DLL \ Dll3 \ Debug> Then dumpbin - exports dll3. DLL
Turned out to be no export function int the add (int a, int b) and int subtract (int a, int b)
F: \ projects \ DLL \ Dll3 \ Debug> Dumpbin - exports dll3. DLL
Microsoft (R) COFF/PE Dumper Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.


The Dump of file dll3. DLL

The File Type: DLL

The Summary

1000. The data
1000. The idata
2000. The rdata
1000. Reloc
1000. The RSRC
4000. The text
10000. Textbss
Please contact with the great god, help me,

CodePudding user response:

CodePudding user response:

I also encountered this problem, the building Lord solved?
  • Related