I am creating a Visual C++ sample project where i need to include a third party library.
I added the lib and added the include directory.
But my problem is now, that the header files of the library have the following line in their header files:
#include <QtCore/QVector>
and the compiler error is:
error C1083: Cannot open include file: 'QtCore/QVector': No such file or directory
I have the used dlls, but I am stuck how to include them?!
I solved it with installing Qt locally and adding it to the PATH.
Related
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\
With Visual Studio 2013 I'm writing a Dynamic Library and I need to use some third-party libraries. Each library comes in the form of header .h, a .dll and .lib files. I added the library's directory to my project, I changed the "Configuration Properties -> C/C++ -> Additional Include Directories" to include the header file and I added the .lib file to the Additional Dependencies of the Linker.
If I try to include the header .h in my .cpp file using
#include "library.h"
everything works fine and the compiler it gives no error. But if I put this line in my header .h file and try to compile I get this error:
error C1083: Cannot open include file: 'library.h': No such file or directory
Any ideas? Thanks in advance.
I'd like to use the image processing package of Dlib (C++ library) in Visual Studio 2013.
I created an empty project and added "dlib-18.16\dlib\all\source.cpp" to my Source Files in the Solution Explorer. Then, I added the path to dlib-18.16 to my Include Directories in VC++ Directories and I also added the path to dlib-18.16\dlib to my Additional Include Directories in C/C++ General of Visual Studio.
I can run the file matrix_ex.cpp which is one of the examples of Dlib, but I can't run the file face_detection_ex.cpp because of the error " Cannot open include file:'type_safe_union/type_safe_union_kernel.h' " which is actually caused by the line #include <dlib/image_processing/frontal_face_detector.h>
How can I resolve this issue? Why the program finds some header files but it can't find the others while they are all located in the same folder?
You need to add the dlib folder itself to the Include Directories in VC++ Directories, you instead added the folder above it.
By extension that would mean your include directive needs to be #include <image_processing/frontal_face_detector.h>.
Let me list a hypothetical example to explain better. You downloaded dlib-18.16.tar.bz2 and extracted it to c:\projects. This creates a folder named c:\projects\dlib-18.16. Within VC++ Directories you added c:\projects\dlib-18.16 to the Include Directories.
However this isn't correct, you should remove that directory and instead add c:\projects\dlib-18.16\dlib as that is the include directory for the project.
That will cause #include <type_safe_union/type_safe_union_kernel.h> to load C:\projects\dlib-18.16\dlib\type_safe_union\type_safe_union_kernel.h as well as similar internal links between files.
I have installed boost using MSVC toolset through command-line(command prompt).
Now, I want to know which directories should I include in my project properties.
Since when I add the following line to my project:
#include <filesystem\fstream.hpp>
It throws the following error:
1>c:\boost\boost_1_56_0\boost\filesystem\fstream.hpp(15): fatal error C1083:
Cannot open include file: 'boost/config.hpp': No such file or directory
I have added the followings to my project properties directories for libraries:
C:\boost\boost_1_56_0\boost
C:\boost\boost_1_56_0\stage\lib
This is where I have added the above paths:
(Project->Properties->VC++ Directories->Library Directories
Don't add the boost subdirectory to the search path; add the parent
C:\boost\boost_1_56_0
and specify the boost directory when you include the headers
#include <boost/filesystem/fstream.hpp> // Better to use / not \ for portability
The Boost headers include each other like that (with boost/ in the path), so now they can also be found.
I'm having trouble using tesseract.
I've downloaded the source code and compiled successfully.
Then I created a project in VC++ and I'm trying to do the first steps.
I created a simple program and included
#include <baseapi.h>
On project properties -> Linker -> Additional Dependencies i`ve put all the libs that tesseract generated
ccmain.lib ccstruct.lib ccutil.lib classify.lib cube.lib cutil.lib dict.lib image.lib libtesseract_tessopt.lib libtesseract_training.lib neural_networks.lib textord.lib viewer.lib wordrec.lib
I also set the path of libs on Additional Libraries Directories. It seems to recognize the libs. But the problem is that i`m getting the following error:
fatal error C1083: Cannot open include file: 'baseapi.h': No such file or directory
Can anyone help me? I`m just starting and it is difficult.
As an update, I've set the paths and included the files on my solution. But I'm getting different errors on ccutil.h.
*fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory *
Due to this code
#ifdef WIN32
#include <windows.h>
#else
#include <pthread.h>
#include <semaphore.h>
#endif
On your project you need to add the path to the tesseract headers in "Additional Include Directories".