libxml/xmlversion.h file not found in windows - c

I want to do XMLParsing in c(windows). for that i need the libxml/xmlversion.h file. so can any one please tell me how to find or include the file in visual studio 2008.
thanks in advance.....

You can download the complete libxml library (including the include files) from the downloads section at the libxml website. A Windows binary version of the libraries (so you won't have to compile the library itself) is available from the maintainer of the windows port.

Related

Visual Studio Code does not include C header files

I recently downloaded Visual Studio Code to begin learning the C programming language. I installed the program as well as the C extension. However, when I tried to create the "Hello, World!" program, it would not run, and in the Problems menu it did not recognize the stdio.h header file, saying that I need to update my includePath. I have not been able to find any stdio.h file on my computer to link to. Do I need to download the C library files (even though I have read they should be included with the compiler), and if so, where can I find them? Or is there another solution? Thanks, and sorry if this is a stupid question, I am new to this.
I think you might be confusing VS Code with the VS IDE.
VS Code is a source editor only; that is to say that it's basically just a glorified text editor. It has the ability to load extensions and open a shell to compile the code, and there are a few extensions that let you debug the code itself, but they can be tricky to get setup and installed to work well with C/C++ code. VS Code does not have a compiler/assembler/linker nor the requisite headers or SDK's as that is up to you (the user) to install and then point to those in your settings file.
The Visual Studio IDE, on the other hand, is a complete integrated development environment that also includes the system headers and SDK's for Windows, as well as the binaries to properly compile, link and assemble your code into a binary for a Windows system (cross platform is possible as well). The Visual Studio IDE comes in many different flavors with the latest being VS 2017.
If you wish to stick with VS Code, you'll need to grab a compiler and the appropriate header files for the system you're targeting. If you wish to just stick with Windows for now, you can grab the Windows 7 SDK here or the Windows 10 SDK here .. you could even grab both and just reference the one you wish when you want. Note that the Windows 7 SDK includes the Microsoft C/C++ compiler, alternatively you can download the MSVC compiler from their Build Tools site.
There's also Cygwin in which you can use the GNU compiler, and of course Clang, which can be referenced in both VS Code and the VS IDE.
I hope that can help.

What is the use of w32api in minGW project

I have been reading about the minGW project and I am a bit confused about a specific part of it. If you look at http://www.mingw.org/wiki/MinGW, the "Packages included with minGW" section mentions a w32api package. What is that?
Since the project was able to produce a Windows port of gcc, wouldn't you just have to link the Windows c library instead of glibc and have it work?
In the same document it explains:
Header files and import libraries for the Microsoft Windows operating system
But doesn't Windows ALREADY provide header files and libraries for itself? Is the libc that minGW uses different from msvrct?
But doesn't Windows ALREADY provide header files and libraries for itself?
No.
Microsoft provides a Windows SDK, which includes C header files, and import libraries for use in Visual Studio only. Other compiler vendors ship those headers (making any tweaks they may require to compile) and import libraries that are appropriate for use in their own compilers.
That is what the w32api package is for minGW. The files needed to compile Windows code in minGW's environment.

Linux-Specific Headers in Visual Studio 2017 Cross-Platform

I have a Linux-specific source file that includes a few Linux-specific headers, such as dirent.h. I added this source file to my cross-platform (Linux) project in VS2017, but IntelliSense is throwing flags at me that it cannot find these headers.
Is there a specific directory I should be adding to my include list to find them?
If not, how do I handle platform specific headers in a cross-platform project?
Edit for clarification: I'm specifically trying to assume that it is a Linux header, but I am editing on a Windows machine using the cross-platform VS feature.
I found the answer in the MS blogs. The short answer is that the includes are never present, and need to be copied over from the Linux machine into a local folder to add.
https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/#includes

Compile lighttpd in Visual Studio 2005

I have a platform independent source code that can run on Windows and UNIX platforms. To compile the source on Windows, there is support for cygwin. But I want to compile it with Visual Studio 2005. How will I do it? What are the project settings required to be done on Visual studio and what about linking options? Will I be able to get any idea from successfully compiled source on cygwin? BTW, source code is in C language. Please someone help me on this.
Thanks in advance!
IMHO you're out of luck. If this project depends on cygwin, you most probably can't compile it with reasonable effort in vs.
Basically (for simple libraries) you should be fine by dumping all the .c and .h files into a visual studio project.
Most of the time you can just drop it to your own sources. If you want to create a library choose create new project -> new library, put all the sourcefiles in there and the library will automatically be linked with your main program.

How to include/link C .lib files in a Delphi project

We have a .lib file with functionality that must be included in a Delphi application.
It is easy to include .obj files, but for some unknown reason, this won't work for .lib files. The help is not very helpful on this. And a google search did not help that much (most helpful was to use an other linker but I would like to avoid it if possible).
One solution could be using C++ builder to create a package, but I'm not very fond of it.
So the question is, does anybody know a way to include a C .lib file into a Delphi project (so the functionality can be used)? Or is there a way to split the .lib file into .obj files.
(By the way we use 2006.
You can use the tlib.exe tool that comes with C++Builder. If you don't have C++Builder you can download the free C++Compiler 5.5 (http://cc.codegear.com/Free.aspx?id=24778) and use the tlib.exe from it.

Resources