Why can't I compile this opensource project - c++

I downloaded the source code from http://construct.svn.sourceforge.net/viewvc/construct/ using tar ball http://construct.svn.sourceforge.net/viewvc/construct/?view=tar
There is a visual studio solution file in IDE subdir I converted in VS2010. When compiling I got 56 Errors like
Error 1 error C1083: Cannot open include file: 'd3dx9.h': No such file or directory C:...\construct\construct\ide\stdafx.h 106 1 Construct
Why? How to fix?

Most likely you either don't have DirectX SDK installed and/or include directories for project (or global settings in VS) are not properly set.
Does this help: Cannot open include file "d3dx9.h"

Related

Include the tlhelp32 header file

I need to include the tlhelp32.h header file from the Tool Help Library but it always comes up with the following error:
error C1083: Cannot open include file: 'tlhelp32.h': No such file or
directory
I did a little bit of research and tried to first include the windows.h header file but this did not change anything.
I'm coding in C++ using Visual Studio 2013 Express with Windows 10 1709. Do I have to download anything else?

How to reference header files in visual studio 2017 project

I have downloaded and tried to build The oxygine engine project with VS 2017 Community. The stringutils.cpp file from it gives me the following when I try to compile:
C1083: Cannot open include file: 'SDL_stdinc.h': No such file or directory
hovering the #include statement it says cannot open source file 'SDL_stdinc.h'
I checked
Properties->C/C++->General->Additional Include Directories
and it references the path the header files are in. I have even added another path representing the absolute path. I tried a different folder, a different download of the header files, all to no avail.
What do I need to do to get this right?
Is there any reason for a header to not work? (version mismatch or something)
Is a header not working if the corresponding dll or lib is missing?
If so, how do I know it is found by VS?
The problem was the path for oxygine in the oxigine project properties was setup like this ..\..\..\..\SDL\include\ but had to be setup like that ..\..\SDL\include\

How to add a header file in Visual Studio 2013, C++

I use Visual Studio 2013 to build a program. I have got some problems...
a) an error:
c:\users\wojciech\desktop\cryingdamson 0.3.6 (8.60) v8.2 source\otpch.h(28): fatal error C1083: Cannot open include file: 'libxml/xmlmemory.h': No such file or directory
My code:
#include <libxml/xmlmemory.h>
I have included that file in Visual Studio 2013 to header files and I have even it at libxml folder. I can not still build solution (compile) because of that error.
Please help me, I am new to Visual Studio. I have tried to add xmlmemory.h file to project properties, but it seems that it doesn't see the file.
Okay, in folder "c:\users\wojciech\my documents/visual studio 2013/projects/consoleapplication3" there is a file named MainProject.sln, which type is microsoft visual solution. In the same folder I have added libxml folder and in the folder I have put xmlmemory.h. The problem is I still can not compile the program.
I use windows 7.
You Need to add the parent Folder of libxml to the include path. Say if the Folder structure Looks like
some_project
include
libxml
xmlmemory.h
...
you Need to add the include Directory to the include path
Where is your xmlmemory.h? Of #include <.../libxml/xmlmemory.h> try a complete path in the ... part.
The path libxml/xmlmemory.h is in fact ./libxml/xmlmemory.h where ./ means the location of your workspace.
===============Next is added according to your comment==========================
Just using #include "..\libxml\xmlmemory.h" would compile. So your workspace path is therefore c:\users\wojciech\my documents/visual studio 2013/projects/consoleapplication3. Under your workspace there should be a folder MainProject where your existed source files are located. So .\ means the path c:\users\wojciech\my documents\visual studio 2013\projects\consoleapplication3\MainProject.
Note that you should use \ other than / to represent your file hierarchy in your project and that you should use "xxx.h" other than <xxx.h>.
You can also use this method: open VIEW->Property Manager, right click on MainProject and open Properties, in C/C++ -> General -> Additional Include Directories, add your folder libxml to it. Then all files under your libxml folder would become a part of your solution. You can just use #include "xmlmemory.h>" to make it compile.
Either way is supposed to compile.

Fatal Error C1083 While using sparsehash library

Hi I am using google sparsehash library. When i compile the code (Visual Studio 2005)it gives following error...
fatal error C1083: Cannot open include file: 'sparsehash/sparse_hash_map': No such file or directory
What is the reason behind this problem and what is its solution.
Thanks in advance...
Make sure you installed https://code.google.com/p/sparsehash/ and your makefile correctly updated to include header file from this sparsehash i.e. something like
-I ./sparsehash/include
In case of Visual Studio make sure your project setting refer to path where file is located.

wxWidget building problems

I've been trying to install and use wxWidgets v(2.8). I constantly run into the same issue. When building the wxWidgets libraries. I get this error:
error C1083: Cannot open include file: 'zlib.h': No such file or directory d:\wxwidgets-2.8.12\src\png\png.h 346
I can't work out why when I've installed it from the exe. I'm following the instructions from here: http://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide
I also get a Linker error which I don't think matters particularly.
Any help would be great. I've tried installing this from the exe and have also just use the zip folder but still run into the same issues. I suspect it might be something to do with environment variables but can't find a definitive answer whether they are required and what they should be set too.
EDIT
Also got something similar here:
error C1083: Cannot open include file: 'expat_config.h': No such file or directory D:\wxWidgets-2.8.12\src\expat\lib\xmlparse.c 30
Cheers
In png.h at line 346 we have
/* include the compression library's header */
#include "zlib.h"
So you need to tell the compiler to look in wxWidgets-2.18.12\src\zlib for headers.
With another install I managed to fix this.