#import: Cannot open file "soap12.h" for reading gSoap in VS 2010
c++, gsoap, visual-studio-2010, wsdl
Solution
The "Error loading type library/DLL" error is from the Visual C++ compiler. That would be caused by an include statement like the following in one of your own files:
#include test.h
To prevent this, just omit that include statement. The .h file that's generated by wsdl2h is only meant to be used by the soapcpp2 program. It's not supposed to be included in your project.
This answer is supported by the following statement from gSOAP's README.txt file:
Do not include the wsdl2h-generated 'calc.h' header file directly into your code (the declarations are replicated in the generated code).
The 'calc.h' file to which that statement refers is a sample file, which in your case corresponds to 'test.h'.
Problem
I'm trying to use gSoap2.8 with VS2010 C++ project I declared a pre-build event ``` wsdl2h.exe -o test.h "test.wsdl" ``` then it says ``` error C1083: Cannot open type library file:<path>\stlvector.h: Error loading type library/DLL. <path>\test.h ``` So I used -s to get rid of that as follows ``` wsdl2h.exe -s -o .\test.h "test.wsdl" ``` but then it say ``` error : #import: Cannot open file "soap12.h" for reading ``` How can I get rid of this?