gsoap : plug in stlvector - visual-studio-2010

I'm writting hellow-world program using gsoap v 2.8 and trying to compile it in Visual Studio 2010. I want to use stl-vector functionality. But there are import errors in directive
#import "import/stlvector.h"
The error:
error C1083: Cannot open type library file: 'r:\work\vs2010\xmlme\xmlme\import\stlvector.h' Error while loading library r:\work\vs2010\xmlme\xmlme\xmlme.h
And consequence:
IntelliSense: cannot open source file "R:/Work/VS2010/XmlMe/XmlMe/Debug/stlvector.tlh" r:\work\vs2010\xmlme\xmlme\xmlme.h
Cannot figure out what Intellisense wants from me. I copied import folder from gsoap directory to my project and referencing it properly as I think.
my solution archive (link may expire)
UPDATE:
I've tried -s parameter for wsdl2h utility to exclude stl-dependency from xmlme.h file. And now I've similar error:
error C1083: Cannot open type library file: soap12.h: Error while loading library. xmlme\xmlme.h
... producing the same weird consequence:
IntelliSense: cannot open source file "XmlMe/Debug/soap12.tlh" \xmlme\xmlme.h

The thing is to not include XmlMe.h (file generated with wsdl2h.exe tool) in the project. It uses soapcpp2-compliant language (C-based but not C and that's why VS10 compiler generates error when including such a file).
Also you need to include .nsmap file, for e.g. in your main function definition file.

Related

.lib file not working in visula studio 2010 C++

My client provide me a dll file without any lib file for the project, so I create a lib file from this link.
Now after successfully generating a lib file I follow the answer of this link
Now after following these two links, I simply build my code in which I have not define any thing till now.My code build successfully, but when I build my code after calling a function from my lib file I got this:-
error C3861: 'upgStop': identifier not found
where upgStop is the function that I call.
It seems something went wrong while linking the lib file. So, guys please tell the exact solution of this problem.
'Identifier not found' is a compiler error (not linker error) which implies the header file which specifies upgStop() hasn't been #included in the file from which the function is being called.
Do you have a header file which contains the declaration/prototype of ugpStop()?
Once this is resolved, you may have linker errors isntead - as you either need to link against the dll/lib, or load it dynamically using "LoadLibrary()" (and then find functions within the loaded library by their string name.

VS compiler does not create inner folders for objects

VS compiler generates the folder where the objects should be created:
OBJS=obj\class_A.obj
obj\class_A.obj : class_A.cpp class_A.h
When generating the above - folder obj is created.
But: In case inner folders are used:
OBJS=obj\INNER\class_A.obj
obj\INNER\class_A.obj : class_A.cpp class_A.h
Trying to build the above, causes error:
fatal error C1083: Cannot open compiler generated file: 'obj\INNER\class_A.obj': No such file or directory
Any ideas?
Is this a VS compiler bug?
This, btw, compiles well with Cygwin.

Where can i find the 16F877A.h?

When i run my program in MPLAB. ( Project wizard -> PIC16F877A -> Hi Tech Ansi C Compiler -> RUN )
Error [141] C:\Users\WhyWhy\Desktop\test.c; 1.22 can't open include file "16F877A.h": No such file or directory
Where can i find the header file for the 16F877A?
Chip-specific header files should not be explicitly included in HITECH-C, the documentation clearly states that. Instead, you include the compiler header, which will take care of including the chip-specific file for you:
#include <htc.h>
All you need for this to work is to configure correct chip in the project settings. The 16F877A.h file exists in the compiler directory, but including it directly will throw a warning.
C:\Program Files\HI-TECH Software\PICC\9.70\include
In my case , I have installed HITech Compiler In C:\ Program Files.
You have to know, where have you installed the files of the compiler.
This file is from the compiler, so in your case the Hi Tech you can find here:
C:\Program Files\HI‐TECH Software\PICC\\include\
Before you have found the file you have to add in the Header Files folder in the Project window on MPLAB.
And in your code you have to include it
#include <16F877A.h>

Builds with command line "devenv" but not with Visual Studio (sln) and MSBUild

I'm trying to set up a project with TeamCity and I was wondering what does exactly happen when I choose “Visual Studio (sln)” from the drop down menu under "Runner Type". When I choose this option my project fails to build and I get a bunch of compilation errors like this :
Logging\LoggingSingleton.cpp(19, 0): error C1083: Cannot open include
file: 'Auto/AutoHandle.h': No such file or directory
d:\tcbuildagent\work\b1f06d91677fef59\consumer_2011_050\coretech\sdk\src\auto\AutoTempFile.h(16,
0): error C1083: Cannot open include file: 'Coretech.h': No such file
or directory
d:\tcbuildagent\work\b1f06d91677fef59\consumer_2011_050\coretech\sdk\src\auto\AutoTempFolder.h(23,
0): error C1083: Cannot open include file: 'Coretech.h': No such file
or directory
d:\tcbuildagent\work\b1f06d91677fef59\consumer_2011_050\coretech\sdk\src\logging\McLog2.h(8,
0): error C1083: Cannot open include file: 'Coretech.h': No such file
or directory
d:\tcbuildagent\work\b1f06d91677fef59\consumer_2011_050\coretech\sdk\src\encryption\McAfeeObfuscation.h(2,
0): error C1083: Cannot open include file: 'Coretech.h': No such file
or directory
d:\tcbuildagent\work\b1f06d91677fef59\consumer_2011_050\coretech\sdk\src\file\BaseIniReader.h(21,
0): error C1083: Cannot open include file: 'Coretech.h': No such file
or directory
d:\tcbuildagent\work\b1f06d91677fef59\consumer_2011_050\coretech\sdk\src\file\IniReader.h(21,
0): error C1083: Cannot open include file: 'Coretech.h': No such file
or directory
d:\tcbuildagent\work\b1f06d91677fef59\consumer_2011_050\coretech\sdk\src\file\BaseIniReader.h(21,
0): error C1083: Cannot open include file: 'Coretech.h': No such file
or directory
d:\tcbuildagent\work\b1f06d91677fef59\consumer_2011_050\coretech\sdk\src\file\BaseIniReader.h(21,
0): error C1083: Cannot open include file: 'Coretech.h': No such file
or directory
However, if I choose “Command Line” as my runner type, and run my solution like : devenv ………../LogReader.sln /Build “Debug” it builds fine with no compilation error. But we don’t want our teams to manually put in the parameters every time, and either build it with MSBuild (gives same errors as Visual Studio sln) or “Visual Studio (sln)”.
You might verify the platform that it is building with, or specify it. We've had similar issues in the past when the project settings were inconsistent across platform, and the platform being built was not the one that was expected. In this case, I would suspect that one platform does not have the same include directories as another.
TeamCity is a build server which has a set of plugin support to perform the more than one type of build process in a very smoother fashion. TeamCity downloads the code from the Source Control application to a working folder and starts the build process. The build process expects the assembly references and libraries as similar to a developer machine. For example, a basic .net application requies the appropriate .net framework to perform the build process. Similarly in your case, the libraries. If you can make the library files available, the build process will run without an issue.

error LNK2001: unresolved external symbol _CLSID_XYS

There is one idl file defined in microsoft sdk which is not available in VS2005. I am using some of the interfaces from that IDL.
Now this works fine on VS 2010 . I want to make it compile on VS2005.
I copied the header file to my project directory. But it is giving me compilation error.
When I looked into header file , the class id is defined in it as
EXTERN_C const CLSID CLSID_Xyz.
Now it is defined as extern so it means it should be declared somewhere else in code.
So my question is just including .h file is sufficient or do I need to also include _i.c file.
Any suggestions
Once you examine that _i.c file you'll see the indeed the CLSID constants are defined there. So yes, you need to incorporate that .c file into you program - either by #including it into a .c or .cpp file or just by adding it to your project so that it compiles separately and then links into the final binary.

Resources