I used to the load library using 1 single. dll file, so if I happen to does method calling between 2 projects in a solution, I Got puzzled.
In the solution, doing method calling between projects are constant, so as far as I can see, the dynamic calling method is Onerous. It's also not Okay to call method from the other project directly, which would invoke the unresolved external l Ink error (2001,1014,2011, etc..) During link.
Eventually I found that static calling is the remedy. In the This is the avoid doing onerous calling that dynamic calling might cause. But the shortcoming was to attach a. Lib with the release, making the size larger. Most times. lib files is small in size.
Dynamic calling in x86 programs:
1 // method definition in. dll:type Func (type1 t1, type2 T2); 2 typedef type (*F) (type1,type2); 3 New LoadLibrary (". dll"); 4 f = GetProcAddress (5 hInst,6 "Func"7 }; 8 // method name never coincides.
Static calling:
1 //statically calling Method2 //First , specify the additional/C + + include directory where func.h is an in C + + general from project properties.3 //Second, if needed, specify the func2.lib file directory in link general from project Properties4 //func.h5#include "Func2.h"//This file contains the function definition6#pragma comment (lib, "Func2.lib")//. lib file contains info about method addresses in. dll file7Func2 ();//Method Calling
Got stucked in C + + Static Library Loading. For some time