how to reference ssleay32.dll in visual studio c++ project - c++

I am new to c++. I have creating a previous copy of the exe application and using the ssleay32.dll and libeay32.dll in visual studio 2017. I have added its path in the C++/General/Include directories and Linker/Input/Additional Dependencies and VC++/Include directories and added the dll in debug folder and current directory. but still cannot figure out what I am doing wrong.
I am unable to include the <openssl/ssl.h> in the cpp file in the project
Any help to fix it?

There is an example on the Microsoft Docs for reference.
project->properties->configuration properties->C/C++->General->Addtional Include Directories->add the path of dll
project->properties->configuration properties->Linker->General->Addtional Library Directories->add the path of dll
project->properties->configuration properties->Linker->Input->Additional Dependencies
For the header file, you could click Project—>Configuration Properties—>C/C++—>General and add the folder path where the .h file is located in the Additional Include Directories.

Related

vs 2017 static library "No Such File or Directory"

I'm having problems importing my custom static library into my project. I have my library in the same solution as the project that I am trying to include it in.
In the VC++ Directory section of the project properties I have put "$(SolutionDir);" in the Include Directories and "$(SolutionDir)Debug\;" in the Library Directories. It is my understanding that the "$(SolutionDir);" is a macro that defines the root directory right? As the library shares the same solution as the project it also shares the same root directory and the .lib file that is created is in the Debug folder of the root directory.
In the Linker/Input section, I have put "GameEngine.lib;" in the Additional Dependencies. "GameEngine.lib" is the file name of the .lib that is in the Debug folder of the root directory.
When I'm trying to include anything from the library it just doesn't even recognise it as existing when writing:
#include <GameEngine/Rendering/Model.h>
Doing it the way below shows that it can actually find the file, meaning the path exists and is correct but I get linker errors doing it this way.
#include "../GameEngine/Rendering/Model.h"
I am using Visual Studios 2017.
Link to GitHub repo: https://github.com/TheHoester/OpenGLGameEngine.git
Thank you
You need to make sure you set the directories for all build configurations. You have only set the include directories for the "x64" platform so building the "Win32" platform won't work. After adding the directories to the "Win32" platform your project builds correctly.
Note that it is more usual to use "VC++ Directories" for system includes and libraries and to use "C/C++/General/Additional Include Directories" and "C/C++/Linker/General/Additional Library Directories" for linking to your own libraries. There isn't any problem that I'm aware of for using the "VC++ Directories" settings though, just make sure not to modify any of the existing paths in there.

How to add Qt libraries to visual studio

I have a source with VC++ 2017
I receive the error "Error C1083 Cannot open include file: 'QtCore/QMap': No such file or directory " when i try compile the project.
I download Qt libraries and add to Include project but the problem exist.
Which directory of Qt of i had to add to project to resolve error?
this is header of my code that generate error
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QList>
You need to update your project. Go to the project properties by right-clicking on it in Solution Explorer and then select Properties. Then:
In C/C++->General->Additional Include Directories you must set the Qt installation include path;
In Linker->General->Additional Library Directories you must add the path of .libs files of your qt installation;
In Linker->Input->Additional Dependencies you must put the name of .lib files that you need in order to build the project.
If it's a Qt project, you should also have the Qt plugin installed, in order to work properly with moc and other Qt features.
In alternative (that I suggest) you can create a CMake project and open in in Visual Studio.

Cannot open include file "windows.h" No such file or directory

I am trying to build a project which contain several C# projects and one C++ project in VS 2013.
But during build the above error is shown, then i googled the error and tried several things but unable to fix the issue.
Things i have tried:
1) Added Window 10 SDK's Include directory to the Additional Include Directories
in C/C++ Configuration properties.
2) Added Window 10 SDK's Lib directory to the Additional Library Directories into the Linker.
3) Making sure that include file is "windows.h" instead of "Windows.h".
Path of Windows.h file present locally in SDK directory is
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um
Does any have any idea how can i fix this ?
Any help will be appreciable.
Go to the project properties -> Configuration Properties -> General
then Change Platform Toolset to Visual Studio 2013- Windows XP(v120_xp).
This is what worked for me.

How to include libcds in VS2015 project?

I'm working on windows. How to include the CDS library in VS project? I could not find 'include' directory, nor 'lib' directory.
http://libcds.sourceforge.net/doc/cds-api/index.html
It seems to be a header only library, just put it in a folder and add a include directory to that folder with visual studio under Properties->VC++ Directories->Include Directory and then all you have to do is
#include <FolderWhereCDSIsAt\allocator.h>
or
#include <FolderWhereCDSIsAt\cache_line.h>

How to import libusb dll

I am using Visual Studio 2013 and have troubles using libusb dll. I have downloaded their source and compiled the dll version under release. New folder was created: D:\libusb-1.0.9\Win32\Release\dll which contains the .lib and .dll files. The next thing I did, was copied the .dll to my Visual studio projects folder, where the source files reside.
In Visual studio I then did: project->properties->linker->input->additional dependencies and pasted in the path to .lib file: D:\libusb-1.0.9\Win32\Release\dll\libusb-1.0.lib. Then I did project->properties->linker->general->additional library directories and pasted in the folder where the libusb header files are: D:\libusb-1.0.9\libusb.
Then I tried including the #include "libusb.h" but it says it cant find the file.
What else do I need to do, to make it work...?
EDIT:
These are the exact errors:
Cannot open include file: 'libusb.h': No such file or directory
IntelliSense: cannot open source file "libusb.h"
The problem is you did not add the folder containing the header file libusb.h to the include folders for your compiler. As a result the compiler can not find libusb.h since it is not in any of the folders the compiler searches.
In Visual Studio to add a folder to the include directories open the project properties for your target and add the folder to the C/C++->General->Additional Include Directories setting.