wxWidget building problems - c++

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.

Related

How to get configuration.h from configuration.h.in in OpenSSL?

I am working with the OpenSSL library for C++. I used this library in another project and it worked great. I carried it over to another project today and I'm having issues.
Two of the header files are .h.in files: opensslv.h.in and configuration.h.in.
In the first project, this was not an issue. But in my new project it gives me an error on this line
#include <openssl/configuration.h>
because configuration.h cannot be found:
...\include\openssl\opensslconf.h(14): fatal error C1083: Cannot open include file: 'openssl/configuration.h': No such file or directory
I understand there is no literal configuration.h file but from what I understand that configuration.h.in file should generate a configuration.h file right?
Does anybody have any idea why that might be happening? Maybe I changed something in the project properties?
.h.in is a template for a header file.
.in suffix looks similar to autotools template files, but according to their FAQ, OpenSSL uses their own build system based on Perl.
Anyway, you should call one of the Configure scripts, and build after that. Docs.
I'm unable to comment, but you need to provide more information about your directory structure. What do you mean by "carried it over"? This most likely sounds like it's happening due to something pointing to the wrong directory. What environment are you working in?
First thing I would do is double check that your project environment is looking in the correct directory for include files.
I also just found this answer that may be helpful to you as well: https://stackoverflow.com/a/31322172/2494727

error with installing odeint <boost/config.hpp>

I'm trying to install odeint but every time I compile the code, I get this error.
c:...odeint\headmyshoulder-odeint-v2-f496df3\include\boost\numeric\odeint\config.hpp(44): fatal error C1083: Cannot open include file: 'boost/config.hpp': No such file or directory
I've included the include path. I checked this file boost/config.hpp, this is not a complete path to <config.hpp>, so I've changed it to <boost/numeric/odeint/config.hpp>. Now I'm getting an error with other files with the same scenario. Is there a way to fix this problem?
It seems you dont have the boost libraries on your system.
odeint requires boost to be available. The easiest way to get both is by just downloading the latest version of boost, which already contains odeint: http://www.boost.org/users/history/version_1_56_0.html

VC++ Error: error C1083: Cannot open source file: '=0x0401': No such file or directory

Summary:
Maybe at a glance, it is a common question, but in my case, I don't reach for an answer.
I downloaded a sample hooking program from codeproject, it has three projects, two of them are dll, and one is the main project that use this two dll to perform its primary goal. But when I want to compile it, a project named: KeyBoardHookLib cause an error:
error C1083: Cannot open source file: '=0x0401': No such file or directory
Question:
It is a common question, I do all available solution, but the problem remains. Could please anyone takes a look at this project and give me an answer to compile it.
From the comments of codeproject :
After your converting to VS2010 solution, precompiled header should be changed from /Yu to /Yc in all 3 projects. Delete '=0x0401' in KeyBoardHookLib.vcxproj.

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.

How to link and use OpenCV headers?

Right, I know this is a very stupid question, but I have no luck with w/e i'm trying to do.
I'm trying to use the objdetect.hpp header file, so I've included the folder C:\OpenCV2.1\include\opencv2\ aswell as C:\OpenCV2.1\include\opencv and a whole bunch of other libraries and dlls when I was following the instructions on http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010
But the openCV version in that tutorial were outdated and doesn't even have the objdetect.hpp file. So I went to download the latest one (OpenCV 2.4.0), but now when I complie it, it gives me an error C1083: Cannot open include file: "opencv2/core/core.hpp" No such file directory.
Am I suppost to put all the OpenCV folders/files in the same directory as my C++ project? Or how do I fix it? I've tried putting it in the same place as my C++ project, but when I do a #include "../" the folder doesn't appear.
Again, I know this is a stupid question, but please help.
Let me know if anyone require more info coz I'm not too sure whatelse to put.
Thanks
The best way to manage changing directories for include files is with the compiler options. Im better at linux and g++, where you would just specify different include path locations with -I attributes.
Its generally considered bad practice to use relative and absolute paths in the #include statements. Module paths are ok #include <sys/time.h>, where sys could be considered the module. Include the file with just its name and possibly the module, then handle the location with the compiler options.