Compiling libjpeg - c++

Is there anyone who succeed to include libjpeg in some compiler? I tried everything: Dev C++, VS10, CodeBlocks, copy the headers and the lib by hand, add with the linker but nothing. Right now I am really confisued as there is not an official guide on how to compile it in any compiler. I would be really happy if someone could provide a tutorial on how the library can be compiled in any compiler.
Thank you in advance.

To compile libjpeg 9 in Visual Studio 2012, here are the steps (after unzipping the archive file):
Download the file WIN32.MAK (for example, from http://www.bvbcode.com/code/f2kivdrh-395674-down), and place a copy in the root source code directory (possibly C:\jpeg-9, but it depends where you unzipped it). I will refer to this directory as %jpegsrc% from now on. Having this file is important; otherwise step 3 will produce an error.
In the Visual Studio command prompt, open to %jpegsrc%:
cd %jpegsrc%
At the same command prompt, execute the following:
NMAKE /f makefile.vc setup-v10
This will create two Visual Studio 2010 solutions in %jpegsrc%: jpeg.sln and apps.sln.
Open each solution in Visual Studio 2012. Each one will prompt you to update all the projects to 2012 format. Click on “Update.” One time I did it, the prompt did not appear. In case that happens, right-click on the jpeg solution in the Solution Explorer, and choose “Update VC++ projects...,” which will produce the same prompt.
Save and build each solution as normal. (You have to build the jpeg.sln solution before apps.sln, since the latter depends on the former.)
Note: this process should work correctly in Visual Studio 2010, without the updating, but I have not tested it.
Update: This method still works in Visual Studio 2015 for libjpeg-9a.

Here is how I've built libjpeg using MinGW on Windows :
1. Get MinGW with MSYS
I've got a copy from http://sourceforge.net/projects/mingw/.
Quoting from www.mingw.org :
MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present.
We will need it to run the configure script that comes with libjpeg sources.
2. Get libjpeg sources
From http://www.ijg.org/, take the Unix format package (the Windows one won't work with this procedure). I took the jpeg_8d version.
3. Prepare a building directory
I've made a temporary directory named tmp in D:\, but you could choose whatever suits your needs. The thing that matters is the name of paths in MSYS. As it brings some * Unixity * to Windows, paths cannot be used in their original form.
In a nutshell:
C:\path\to\file becomes /c/path/to/file in MSYS land, an so
D:\tmp becomes /d/tmp.
Decompress the libjpeg sources in D:\tmp, so you have a jpeg-8d directory in there.
Create a jpeg-build directory inside D:\tmp, it will hold the built library.
Now everything is ready for the build.
4. ./configure, make, make install
That is the mantra of building in Unix land. An option should be added to redirect the install process to D:\tmp\jpeg-build.
Run the following commands in an MSYS shell (also named MinGW shell in Windows start menu):
cd /d/tmp/jpeg-8d
./configure --prefix=/d/tmp/jpeg-build
make
make install
As an additional step, you can run make test for safety.
These commands will build both static and shared versions of libjpeg.
5. Take the goods, delete the temporaries
If everything runs fine, you can delete the D:\tmp\jpeg-8d directory, but keep the jpeg-build one. It contains:
an include directory, containing libjpeg headers. You can move them to your compiler's headers directory.
a lib directory, with .a file to pass to the linker. You can move them to your compiler's library directory.
a bin directory, holding the libjpeg shared library libjpeg-8.dll and jpeg tools.
a share directory, containing man pages for the jpeg tools.
You can now build your program and link it against libjpeg by indicating the right include and library paths.
You can find many details about the libjpeg building and installation process in install.txt inside the source package.
I hope this will be useful.

It is really simple to build jpeg.lib with VS10.
First, download the libjpeg source code in zip format. At the time I'm writing this you can find it here.
Then extract the contents of the zip file to your disk.
Then open a VS2010 command prompt shell (or call vcvarsall.bat on any command prompt window), cd to the jpeg source directory (jpeg-8d in the download referenced above) and type the following:
nmake -f makefile.win setup-v10
This will generate two VS2010 solutions, and a bunch of project files. The solutions are:
jpeg.sln, which builds jpeg.lib
apps.sln, which builds the sample applications.
Good luck!

If you don't happen to have Visual Studio 2010 installed, here is what works on Visual Studio 2017:
Basic / Common steps:
Download the latest version of libjpeg from: http://www.ijg.org/ (zip version) and extract it to a folder
Open the "Developer Command Prompt for VS2017"
Change directory (cd) to where you extracted the library source
VS 2017 Approach:
Include the Windows SDK v7.1A directory (required for Win32.Mak by nmake later on) by running: set INCLUDE=%INCLUDE%;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include
Run nmake /f makefile.win setup-v15 (note the v15 for VS2017 here)
From here on follow what #AthanasiusOfAlex explained to upgrade the Visual Studio 2010 solution to the Visual Studio version you are running. If you want the Debug configuration, follow what #SteveEng explained.
Errors you might stumble across:
If nmake fails and tells you it doesn't know how to make
jconfig.h, manually rename the file jconfig.vc to jconfig.h
If nmake fails and tells you Win32.Mak cannot be found, manually copy it from the SDK dir mentioned in step #4 to the libjpeg source directory. If you don't happen to have that SDK version installed, download the file from a trustworthy resource.
If nmake fails and tells you it doesn't know how to make setup-v15, trial and error your way through starting with setup-v10, setup-v11, etc... These are VS versions and one of them should work as long as you have any VS version later than VS 2008 installed.
Hope this helps people going through similar pain with this.

If you want debug mode as well in MSVC. Follow AthanasiusOfAlex's method, build the release, then:
Right-click on the project and select properties at the very
bottom
Click on configuration manager and on the active solution
configuration drop-down select -new-
Set the name to debug and on
the drop-down select copy configuration settings from release and
click OK
Close the dialog, go to general settings and under Target
Name add a d to the end so it looks like this: $(ProjectName)d
On Whole Program Optimization drop-down select: No Whole Program Optimization
Then click on the C/C++ under configuration properties on the left and on the Debug Information Format drop-down select C7 compatible (/Z7)
Under optimization select disabled and select NO for both Enable Fiber-Safe Optimizations and Whole Program Optimizations
Under preprocessor, preprocessor definitions, click on edit and use the following:
WIN32
_DEBUG
DEBUG
_LIB
_CRT_SECURE_NO_WARNINGS
Under code generation, under runtime library select Multi-threaded Debug DLL (/MDd)
Build and you're done!

This is for VS2019 with version number 16.0
Consider the Visual Studio Version name correctly like this for creating the .sln file.
Product name Code name Version number
Visual Studio 2019 Dev16 16.0
Visual Studio 2017 Dev15 15.0
Visual Studio 2015 Dev14 14.0
Visual Studio 2013 Dev12 12.0

Related

Compiling GDCM dlls 2.8.4 for Windows with Visual Studio 2013

I am trying to compile GDCM 2.8.4 for Windows. Can anybody describe how to compile it with Visual Studio 2013 Professional? The GDCM wiki is out of date. Thanks a lot.
First of all, you will have to install CMake. Then
Start CMake GUI.
I guess you already have the gdcm-2.8.4 directory (in a directory X:\XXXXX\ ) containing
Applications
Source
Testing
Utilities
and other subdirs. So set the in the CMake GUI "source dir" to X:\XXXXX\gdcm-2.8.4 . (NOT to its Source subdir!).
Then you create a new directory, where CMake will create the VS projects, let's call it X:\XXXXXX\GDCM-VSProjects. In the CMake GUI set "Where to build the binaries" to X:\XXXXXX\GDCM-VSProjects.
Then, in the CMake GUI press "Configure".
After configuring CMake offers you some options; choose at least GDCM_BUILD_APPLICATIONS, GDCM_BUILD_EXAMPLES, GDCM_BUILD_SHARED_LIBS. For documentation you will need doxygen, latex and possibly more.
Then, in the CMake GUI press "Generate". Now a lengthy calculation is performed and finally VS solution and VS subprojects are generated into your new X:\XXXXXX\GDCM-VSProjects subdirectory.
Now you can open GDCM.sln in VisualStudio and BuildAll in 64 bit Release mode.
After the build, you will find libs, dlls and exes in the bin/Release subdirectory of your X:\XXXXXX\GDCM-VSProjects.
Thats it.

Building FFMPEG for Visual Studio development

I'm trying to use ffmpeg in Visual Studio 2013 C++ software (ultimately as part of an OpenCV project) - but right now I'm just trying to get basic FFMPEG functionality. In general, when building in Visual Studio, I build 64--bit software with Multi-threaded DLL runtime libraries. I have built ffmpeg using the general instructions for 'Native Windows compilation using ... MinGW-w64' at http://ffmpeg.org/platform.html#Windows (I provide a more detailed set of steps I followed below...).
After building the ffmpeg software on my system, I tried to create a simple 'hello world' project in Visual Studio 2013. Specifically, I tried to implement the initial tutorial file presented at http://dranger.com/ffmpeg/tutorial01.html. Upon building the project, I get the error:
c:\msys64\usr\local\ffmpeg\libavutil\common.h(45): fatal error C1083: Cannot
open include file: 'libavutil/avconfig.h': No such file or directory
The following are the detailed steps I took to build ffmpeg and create my basic Visual Studio project:
============ Building ffmpeg ===============
Downloaded and intalled msys2-x86_64-20160205.exe from http://msys2.github.io
Ran update-core to update the Msys2 install
Ran pacman -Suu (twice) to complete the update (following the instructions about updating shortcuts, etc.)
Then I quit out of the MSys2 shell and opened the MinGW-w64 Win64 Shell. In this new shell:
Installed the following packages using pacman -S <package-name> The list of packages I installed is: make, pkg-config, diffutils, mingw-w64-x86_64-yasm, mingw-w64-x86_64-gcc, mingw-w64-x86_64-SDL, git
Then I cd'd into cd /usr/local
Ran git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
I wanted to build the ffmpeg library 'out-of-tree' of this MSys64 folder. So, in the regular file system of my Windows machine I created a folder at C:\ffmpeg
Back in the Win64 Shell, I cd'd to this new folder: cd /c/ffmpeg
Then ran /usr/loca/ffmpeg/configure --enable-shared
Then make -r
And, finally make install
Now, if I had to guess, my 'flaw' was in the options I used when calling the 'configure' script of ffmpeg. Do I need to use particular options so that I can take the ffmpeg libraries built here and use them as dynamic (DLL) libraries in Visual Studio?
========== Configuring my Visual Studio Project ============
Here's how I created a simple hello world project in Visual Studio to see if ffmpeg is working.
I created a new Visual C++ 'Empty Project' in Visual Studio 2013
I then configured the project properties as follows:
a. In C/C++ => General => Additional Include Directories, I put
C:\msys64\usr\local\ffmpeg
b. In Linker=>General => Additional Library Directories, I pointed to each of the built library folders (basically I pointed at all of the libraries that were built to ensure I was not inadvertently missing the critical one). The list is as follows:
C:\ffmpeg\libavcodec
C:\ffmpeg\libavdevice
C:\ffmpeg\libavfilter
C:\ffmpeg\libavformat
C:\ffmpeg\libavutil
C:\ffmpeg\libswresample
C:\ffmpeg\libswscale
C:\ffmpeg
c. In Linker=> Input => Additional Dependencies, I pointed to the particular libraries (again - I pointed to all of the ones present). The list is:
avcodec.lib
avdevice.lib
avfilter.lib
avformat.lib
avutil.lib
swresample.lib
swscale.lib
I then created a new source file called 'tut01.c' and copied/pasted the code from http://dranger.com/ffmpeg/tutorial01.c
Then hit F7 and got the error specified above about not finding avconfig.h
The above is my best guess as to the steps I need to follow to get this working in Windows (btw, it's Windows 10, 64-bit) & Microsoft Visual Studio 2013. What should I change to get this basic program to build and run?
#halfelf, thanks for the responses. They caused me to take another look at my files and I realize I was pointing at the wrong location for the include (and lib) files. Turns out that, upon building ffmpeg, it places in lateral folders /usr/local/include and /usr/local/bin, I guess, a more complete set of include and library files, respectively (including avconfig.h!) I updated my Visual Studio project properties to point at these folders which solved that problem.
But subsequently, I ran into a new problem of 'PIX_FMT_RGB24' not being identified. However, I think this is related to the tutorial file I'm using being out of date. I can delete those (and related) lines and the code will build and execute (though it does not do much since the 'money' lines of code are removed). But at least base features of ffmpeg appear to be working.

C++ OpenGL Project Setup using GLEW, assimp, SDL2 and CMake with CodeBlocks

I've done a whole tutorial about making a 3D Rendering Engine in OpenGL with Java and lwjgl and the guy who made the tutorial also wrote the engine in C++
To increase my knowledge about programming I wanted to take a look at the C++ version too. Also I believe (and I might be totally wrong) that I'm actually able to do a lot more with C++ than with java. The main problem I have is that I cannot get the engine running despite the included instructions and I would really appreciate if someone can help me out.
this is the engine i want to setup: https://github.com/BennyQBD/3DEngineCpp
I want to use CodeBlocks for this project since it was recommended and unlike Visual Studio it is free.. I also already downloaded glew, assimp and sdl and I installed CMake which are needed for this to run. Now I have to put that together according to this instruction here:
###Windows/MinGW###
- Make sure CMake is both installed and added to the system PATH.
- Open a Terminal and run:
```Shell
# install dependencies
# Install GLEW in %PROGRAMFILES%/GLEW or SET %GLEW_ROOT_DIR% to where GLEW is on your machine (Example: D:\PATH_TO_GLEW)
# Install SDL2 in %PROGRAMFILES%/SDL2 or SET %SDL2_ROOT_DIR% to where SDL2 is on your machine (Example: D:\PATH_TO_SDL2)
# Install ASSIMP in %PROGRAMFILES%/ASSIMP or SET %ASSIMP_ROOT_DIR% to where ASSIMP is on your machine (Example: D:\PATH_TO_ASSIMP)
cd build
# REPLACE "Visual Studio 12" with your preferred build toolchain (Maybe you want "Codeblocks - MinGW Makefiles")
# BTW VS 10 is VS 2010, VS 11 is VS 2012 and VS 12 is VS 2013, BLAME MicroSoft for the naming! LOL!
cmake -G "Visual Studio 12" ../
# open the generated SLN file (or cbp file if using CodeBlocks) and build!
```
- Copy the DLLs in /lib/_bin/ to /build/Debug/ and /build/Release/
- In Visual Studio, set the Startup project to 3DEngineCpp
- Move the res folder into the build folder
- Run
Major problem is, since I've only done java coding in eclipse I'm a bit confused..
What does he mean by "Open a Terminal and run: '''Shell" ?? and how am I supposed to install glew, sdl2 and assimp? what's cd build? and why do I need CMake, it isn't really mentioned what it does..?
Maybe someone can elaborate (step by step if possible) what I need to do in order to get this running, thanks a lot!
No guarantees my steps will work flawlessly as external dependencies in C++ is still very painful to deal with for me, but I'll give you some leads and hope you make some progress. Also, I've never used Code::Blocks, so I'm not sure if Visual Studio projects are compatible with it. This is the only way I know how to do things on Windows.
First, you'll need to install CMake. CMake is a utility that generates project files so that the project can be easily compiled on certain platforms. It generates Visual Studio project files on Windows, which will allow you to open the project in Visual Studio, and compile them from there.
In order to build the project, you'll have to sort out its dependencies first.
GLEW:
Download GLEW's sources and extract everything. It comes with Visual Studio project files
Open up Visual Studio with Administrator permissions
Open up GLEW's project
Build everything
Run the install "project" to get Visual Studio to install GLEW
Assimp:
Download Assimp's source from GitHub
Extract the project root directory somewhere. The root directory is the directory where CMakeLists.txt is in
Open CMake's GUI utility
Click Browse Source, and select that directory
Select an output directory by clicking Browse Build
Click Configure, when that's done click Generate. This will generate a Visual Studio project file for you
Open project with Visual Studio, build everything. Run install like you did before to install Assimp
SDL2: SDL's sources come with Visual Studio project files, so you can repeat the steps for GLEW to install it.
Now you can finally start attempting to get the engine to work. No guarantees that it'll work, but I'd try the same thing I suggested for Assimp as they're both CMake projects. Once the project files are generated, you can open it up in Visual Studio. Except this time, you won't really be installing it. You can modify the sources and run it like you would any other C++ project.

Open Cmake Project in Visual Studio like Qt Creator

I used to program at Qt Creator in linux But now I am working on Windows and Visual Studio (I am forced to it). When I was programming in Qt Creator these features was so great and useful for me:
Opening several cmake project at the same time and easy switching between them.
There was no need to run cmake command in terminal before opening the project and Qt Creator was handling this matter itself. Therefore, if there was any error in CMakeLists.txt I could correct it from inside of Qt Creator
Now, In Windows you should run cmake command in cmd before you open the project in Visual Studio.
Are there any Extensions or Add-on's for Visual Studio to have the mentioned features of Qt Creator for opening a cmake project?
Do you have any other suggestion for working on a cmake project in Visual Studio?
For your first question, Visual studio provide you a complete solution and you can add and switch between projects easily inside a solution. (see differences between projects and solutions in this post)
But for your second question, I don't know any official extension to do that. But once you created a solution with Cmake, you can easily change the CmakeList in VS.
If you insist in doesn't running Cmake commands, you can write an extension for visual studio see this for more information.
No. QtCreator plays better with cmake than Visual Studio. With QtCreator you can open the CMakeLists.txt as a "project" and run the cmake config step directly. With Visual Studio, you must run the initial cmake config (with the generator option) first to generate the projects and solution. With QtCreator you can also open multiple projects (corresponding to multiple top-level CMakeLists.txt files) together. With Visual Studio, you can only open one solution at a time, and each top-level CMakeLists.txt corresponds to a solution.
While QtCreator works better with cmake than Visual Studio, cmake and Visual Studio are still an excellent combination (and as a whole my preferred working toolset)--just one for which you must run the inital cmake configure step before being able to open the solution. Note that it is just the initial cmake config step that is required. Once you have generated the solution and project files and are using the VS IDE, subsequent changes to CMakeLists.txt files or any input files to the configure_file command will cause cmake to reconfigure before VS builds the solution.
Also Visual Studio 2013 works better than 2010 because when you do trigger a cmake reconfigure it will ask you if you want to reload all the projects. VS 2010 will prompt you to reload each one, which is a pain when you have a lot of projects. (I typically have 20-100 projects in a medium to large codebase.) And sometimes VS 2010 will crash with cmake reconfigures. (Nothing is lost--it is just a pain to have the IDE crash and have to re-open it.)
As for other suggestions:
my comment above about automatic reconfigures, is based on not setting CMAKE_SUPPRESS_REGENERATION to ON as suggested in a comment above by drescherjm. (Based on your workflow, this may be a fine way to proceed, it just conflicts with the way I have used cmake/VS and will prevent reconfigures as I described.)
For building you do not have to use the vcvarsall.bat script as described by DevSolar because that is all sorted out by cmake with the -G argument. For a 64-bit build with VS 2013, I use -G "Visual Studio 12 2013 Win64". (Note VS 2010 is vc10, VS 2012 is vc11, and VS 2013 is vc12.) It is still, however, helpful to have a correct runtime environment, which I get using
call "%VS120COMNTOOLS%....\VC\vcvarsall.bat" amd64
You can get a command line build by cd'ing to the build directory (the one containing the generated solution file) and executing
cmake --build . --config Release
You can also specify which project to build by adding --target MyProject
Now (2015), in Windows you should run cmake command in cmd before you open the project in Visual Studio.
Not anymore, with recent version of Visual Studio 19 (2020): See "Build systems and projects"
Open a folder that contains a CMakeLists.txt file.
CMake support is integrated into Visual Studio. You can use the IDE to edit, test and debug without modifying the CMake files in any way. This enables you to work in the same CMake project as others who might be using different editors.
CMake is the recommended approach for cross-platform development. For more information, see CMake projects.
No need to generate any files first.
That is why a project like Git, for instance, will ignore said generated files: they are not needed anymore to open a CMake project:
With Git 2.29 (Q4 2020), using the CMake support added some time ago for real with Visual Studio build revealed there were lot of usability improvements possible, which have been carried out.
See commit 0ad621f (30 Sep 2020) by Junio C Hamano (gitster).
See commit f2f1250, commit b490283, commit 2d9eb4e, commit 8c35e82, commit f1bd737, commit 8f45138 (30 Sep 2020), commit e18ae4e, commit 72b6eeb (28 Sep 2020), and commit 3eccc7b (25 Sep 2020) by Johannes Schindelin (dscho).
(Merged by Junio C Hamano -- gitster -- in commit 8250ab0, 05 Oct 2020)
cmake: ignore files generated by CMake as run in Visual Studio
Helped-by: Đoàn Trần Công Danh
Signed-off-by: Johannes Schindelin
As of recent Visual Studio versions, CMake support is built-in: https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=vs-2019
All that needs to be done is to open the worktree as a folder, and Visual Studio will find the CMakeLists.txt file and automatically generate the project files.
Let's ignore the entirety of those generated files.
That has practical consequence on a project on-boarding.
If we take the example of a project like Git, again:
cmake (Windows): initialize vcpkg/build dependencies automatically
Signed-off-by: Johannes Schindelin
The idea of having CMake support in Git's source tree is to enable contributors on Windows to start contributing with little effort. To that end, we just added some sensible defaults that will let users open the worktree in Visual Studio and start building.
This expects the dependencies (such as zlib) to be available already, though. If they are not available, we expect the user to run compat/vcbuild/vcpkg_install.bat.
Rather than requiring this step to be manual, detect the situation and run it as part of the CMake configuration step.
Note that this obviously only applies to the scenario when we want to compile in Visual Studio (i.e. with MS Visual C), not with GCC. Therefore, we guard this new code block behind the MSVC conditional.
This concludes our journey to make it as effortless as possible to start developing Git in Visual Studio: all the developer needs to do is to clone Git's repository, open the worktree via File>Open>Folder... and wait for CMake to finish configuring.

How to build boost Version 1.58.0 using Visual Studio 2015 (Enterprise)

I like to build boost 1.58.0 using the (new) Visual Studio 2015 (Enterprise). In the past I proceeded in the following way:
Download boost 1.58.0 from www.boost.org
Extract files (e.g. C:\thirdparty\vs2013\x64\boost_1_58_0)
Start Visual Studio 2013 x64 command prompt (VS2013 x64 Native Tools Command Prompt)
Change to boost directory (e.g. cd C:\thirdparty\vs2013\x64\boost_1_58_0)
Execute .\bootstrap.bat
Execute .\b2 -j8 --toolset=msvc-14.0 address-model=64 --build-type=complete stage
b2 -j8 --toolset=msvc-12.0 address-model=64 --build-type=complete stage --with-python
But in VS2015 there is not VS2015 command prompt.
Also the vcvarsall.bat is missing that I used sometimes to setup a VS2013 command prompt.
How can I compile the source code of boost using VS2015?
Unfortunately Boost documentation is quite verbose because it tries to take care of all OS and environments. Also, it skips over some time saving details. Here's quick steps specifically for VS2015 with Boost 1.61.
First, let's understand that Boost is huge library with lots of contributors. Consequently, all of the Boost code is divided in to two parts: headers only libraries and header+cpp libraries. The former doesn't require compilation. You just include them and you are done. Later does require building. You typically don't need to worry about extra steps of building, although its good idea to just set everything up once.
Using Boost Header Only Libraries
Download the Boost archive in 7z format and extract using 7Zip. The zip file is much bigger than 7z file and can take over 20 minutes to extract by Windows Explorer vs 5 minutes by 7Zip.
Create folder c:\Program Files\boost. Copy extracted boost_1_61_0 folder in this folder. This exact path is not a requirement but we will use that here.
In whatever VC++ project you want to use Boost, go to that project's right click Properties > C/C++ > General > Additional Include Directories and add path C:\Program Files\boost\boost_1_61_0 without quotes.
Now you should be able to use most of the Boost libraries by using statement like #include <boost/thread/mutex.hpp>.
Using Boost Header+CPP Libraries
Examples of these are Boost.Chrono, Boost.Filesystem, Boost.GraphParallel, Boost.IOStreams, Boost.Locale, Boost.Regex, Boost.Thread, Boost.System etc. Unless you are using these libraries, following steps are not needed.
First make sure you don't have Windows Driver Kit installed. If you have, uninstall it for now because most likely it has messed up include paths that will cause Boost's build script to fail.
Invoke VS2015 x64 Native Tools Command Prompt as Administrator.
CD to C:\Program Files\boost\boost_1_61_0 and then run bootstrap.bat.
Run .\b2
Run .\b2 variant=debug,release link=static runtime-link=static address-model=64
Cut folder C:\Program Files\boost\boost_1_61_0\stage\lib and copy it to C:\Program Files\boost\boost_1_61_0\lib.
For the VC++ Console project you want to use these libraries, right click Properties > Linker > General > Additional Library Directories and add path C:\Program Files\boost\boost_1_61_0\lib. For VC++ library projects you will find same setting in Properties > Librarian.
Now you are all set!
Note: Original question about not finding command prompt is addressed by answer from #Arnaud. Above are more clarified steps for Boost installation also step #5 below for more detail on command prompt.
I Tried to install Qt and I had the same issue: vcvarsall.bat was missing.
In my case the problem was that I unchecked The Visual C++ Common Tools.
I modified my VS 2015 installation and added the missing feature Common Tools for Visual C++ 2015:
After the modification, the File is in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
below are the steps
1) Download library from below this site http://www.boost.org/
2) Unzip it.[I have extracted files at "F:\Internet-Downloads\boost_1_65_1" path]
3) Open "Developer Command Prompt for VS2015" as shown in the below snapshot.
4) Go to the directory in which you have extracted your files.
5) run bootstrap.bat file as shown in the below snapshot
6) you will get installation information as shown in below snapshot
7) start VS2015, and create a test application as shown in below snapshot
8) include boost directory in your project[Project Propertry->C/C++->General->Additional Include Directories]as shown in below snapshot
9) Run the application, add "_SCL_SECURE_NO_WARNINGS" in the preprocessor directory if you encounter with "error C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe ......" error.[Priject Property->C/C++->Preprocessor->Processor Definitions]
10 output:
Use https://github.com/Microsoft/vcpkg from the VS Command Prompt.
To find and invoke VS2015 x64 Native Tools Command Prompt, just start typing "native" in Windows Start->Search programs and files text box. System should find command prompt