VS 2017 install libraries - visual-studio-2017

I just installed the free VS2017. I have an old project that I used with VS2013. It uses the math.h library. But now VS2017 cant find the library. I am not sure if I didnt install the correct modules or that something is now pointing in the wrong place. Can someone tell me which module I have to install or whether its included automatically.

are you aware of the nested cmath in VS?
I mean
suppose your old project is using lets say #include <iostream>
then you have automatically nested cmath in your project...
just navigate in the Include libs (ctrl+shift+G)
and you will see this nested inclusion of dependencies:
iostream → istream → ostream → ios → xlocnum → cmath

Related

Cannot include external C++ libraries using vcpkg Viual Studio Code

I am new to making c++ projects (I just know the programming language), I am trying to make a c++ project and want to import the sqlite3 module in c++ using vcpkg.
I have successfully installed vcpkg and installed the libraries using vcpkg install sqlite3.
I have also used the vcpkg integrate install command to make it readily available to all kinds of c++ projects.
But my VS Code is not able to locate the required header file sqlite3.h when I try to include it in my main.cpp file.
I have checked the include-path settings of VS code and have already added the vcpkg include path in it but the problem still persists.
I tried to change the compilers paths many times but the problem still exists.
My compilers include: msys-g++, LLVM-clang++, and Microsoft-msvc.
I tried googling a lot but couldn't find a proper solution to my issue.
I find it very difficult to import any other packages/libraries in my project due to this reason as c++ does not have properly maintained package managers like npm, pub, or pip.

Installing Boost v1.70 in Visual Studio 2019 using Nuget

I'm learning C++, some of the Boost libraries and VS2019 Community Edition. I'm currently reading through the Boost website's online material and the book Learning Boost C++ Libraries, trying to follow along. I would like to update to 1.70.0 and figure out exactly why my code is building correctly. I know, I know...if it's working why question it? Well, the truth is I just don't understand why!
I wasn't aware of Nuget and vcpkg prior to downloading and installing Boost 1.68.0 manually (BTW, there seems to be way too many ways of installing the libraries and it's quite confusing). I have since deleted the original Boost installation directory and tried to install the Boost libraries through Nuget in VS2019. This didn't appear to be successful (although I suspect vcpkg (see below) has something to do with it). I was getting a single linker error (can't find the .lib file) which I eventually resolved (don't ask me how...it's a confusing story involving creating a new project and cutting/pasting my code. Now it works; go figure).
Currently, when I begin an #include directive () in my code I can see the path to the files which is buried under D:\...\vcpkg\installed\x86-windows\include\boost. I've never used vcpkg directly so I have no idea why it's there. The Property Pages for the project don't list the paths under C/C++ > Additional Include Directories or under Linker > Additional Library Directories so I haven't a clue from where the compiler and linker are getting the references. There appear to be no packages installed under the Nuget UI.
Ideally, I would like to start over with the Boost installation and use VS internal tools to do so. I will probably have several different VS solutions as I explore Boost and would prefer Boost to be available to all future projects. Is that possible?
Any advice?
One thing to keep in mind is that the "boost" package only installs the header only libraries, it doesn't install all the libraries that require a binary library.
To install the binary libraries, you need to install individual packages, for instance "boost_log-vc141" is the boost logging library.
First, install the boost package into your project using NuGet. You should see a packages.config added to your project that looks like this:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="boost" version="1.70.0.0" targetFramework="native" />
</packages>
Next, include the desired boost header file:
#include <boost\array.hpp>
You can confirm that the header is being loaded from the correct path by placing the caret after the hpp, pressing CTRL+SPACE, then hovering hovering over the item in the context list:

can't compile c++ netlib 0.11.0 in vs2013

I'm trying to get c++ netlib 0.11.0 working with Visual Studio 2013, and I'm having quite a difficult time. I placed the netlib main folder in my visual studio folder, and I set the include directory properly. You can see this clearly in the following image:
http://i.imgur.com/mfGmpHv.png
The documentation / examples for c++ netlib tell me that to get started, I need to include
#include <boost/network/protocol/http/client.hpp>
but when I do this, my compiler can't find anything as shown below:
http://i.imgur.com/HyVFezq.png
Am I supposed to merge the contents of the cpp netlib with the boost library? I've tried to do that as well but I get a whole other list of problems. I have no idea how to get this working, anyone have any ideas?
Simply install the latest release of Boost and make sure the project's include and library paths are set to include where you installed (and compiled) Boost.

Adding C++ to Objective-C, error on #include for cryptlib.h and curl.h

EDIT : OK, I fixed the issue I outlined originally with not being able to find headers for curl and cryptlib. But, after fixing these issues by installing curl and libcryptopp with macports, I encountered a zillion errors in the associated files. I'm marking this answer as complete though
I'm trying to add the Mega.co.nz client SDK to an Objective-C XCode project. The client is written in C++, with .h header files and .cpp implementation files. XCode recognizes these as needing to be compiled with the C++ compiler (I presume).
At this point all I want to do is get the project to compile with no errors. At this time I am getting two errors, both of them on some #include statements.
#include <curl/curl.h> 'curl/curl.h file not found'
#include <crypto++/cryptlib.h> 'crypto++/cryptlib.h file not found'
I think it has something to do with me not having the correct components installed or not referenced correctly within XCode. Should I be linking against a static library to get these headers? Is there a project setting I need to change to search in a specific directory to find these files?
If you can help, thank you very much.
Xcode cannot find the above headers. This is because they are not in the include path. This is most likely to one of two reasons.
You don't have the above libraries installed.
You haven't added the correct path to your build config (like /opt/local/include if you are using macports)
Solutions to try:
Make sure that you actually installed Curl and cryptopp (crypto++) (i.e. compiled them yourself or used a package manager like macports or brew)
Make sure that your build includes the paths to these files (Look at the "header search paths" in xcode project settings
PS. Do not think about linking or such - this has nothing to do with it. You will run into these problems after you've actually compiled the code - i.e. in the linking phase :)

Installing the Eigen library in Visual C++ 2010

How can I install the Eigen library in Visual C++ 2010? I downloaded the library from eigen.tuxfamily
But I do not know how can install it on my Visual C++. I want to run a program I downloaded and it has the following:
#include <Eigen/Core>
using namespace Eigen;
How can I do this? I have tried to look online but I seem to get confused. Could someone explain to me how I can do it?
Eigen is mostly header-only library. All that you need is to add Eigen path to (MSVC2010):
Project Properties -> C/C++ -> General -> Additional Include Directories
Let's say you have header Core in folder C:/folder1/folder2/Eigen/, i.e.:
C:/folder1/folder2/Eigen/Core
So you should add path C:/folder1/folder2 to Additional Include Directories.
From the Eigen docs:
How to "install" Eigen?
In order to use Eigen, you just need to download and extract Eigen's source code (see the wiki for download instructions). In fact, the header files in the Eigen subdirectory are the only files required to compile programs using Eigen. The header files are the same for all platforms. It is not necessary to use CMake or install anything.
...
Compiling and running your first program
There is no library to link to. The only thing that you need to keep in mind when compiling the above program is that the compiler must be able to find the Eigen header files. The directory in which you placed Eigen's source code must be in the include path.
So you don't actually install anything.