VC++2010 problems calling a dll which calls other dlls
I have four dlls, lets say A.dll B.dll C.dll D.dll. They are all built using vc++ windo开发者_如何学JAVAws application wizard with dll and export symbol options.
A.dll is using functions from BCD. BCD has been proved to work with test applications separetely. And now I am testing A.dll.
However, no matter how I changed or compiled the A.dll, when I call it in test application (before the program run into main), it alwasy said, the function(function in A.dll)'s entry point is not found in the A.dll. I manualy opened the A.dll with notepad, and I can see the function is definetely there with the same name. The function name is also in A.exp and A.lib
The way I complier A.dll is the same as BCD by including their libs and dllimport. In my test program, I tried to include A.lib/ABCD.libs, but it didnt work. When I complie A.dll, I included BCD.libs
I used Dll export view, which showed the function is there and correctly exported. I think it might be the lib file generated by vc++ having problem finding the function when the dll itself using other dlls
I found the problem.... which is quite stupid, there is another A.dll some where in the system with the same name and loaded first :SSSSSSSSSS
精彩评论