I'd like to ask how to include boost hpp files in cross platform Linux project. I am developing on Windows and compiling remotely on Linux with VS 2017.
For IntelliSense the C++ header files from Linux are automatically copied to Windows machine.
Is it the case with boost hpp files also?
How is it in a case when boost is just extracted from a package on Linux and not installed by apt-get... command?
Do I need to install boost on Windows also?
How to refer to hpp files so that both VS IDE and g++ would find the files?
Thanks.
I have to figure out how to make it work, so I post it here if someone else needs a help:
To make IntelliSense work, the boost has to be on Windows. The VS can not be instructed to download additional include files from Linux. What it downloads from Linux is not user configurable in VS 2017, so we have to install or download boost files on Windows manually.
Add the path to VS in Configuration Properties->C/C++->General->Additional Include Directories. For example $(ProjectDir)../../boost_1_68_0/;
Add path to boost which is on Linux machine. For example: /usr/local/boost_1_68_0/;
Now you should be able to compile VS solution and IntelliSense should work.
If someone knows how to avoid installation of boost on Windows and use only boost installation on Linux, please let me know. I don't understand why VS does not allow to manually specify additional includes for a download.
Related
I have a c++ program that was originally written in Linux. The program uses functions from the library libzip:
https://libzip.org
I am now working on a windows-based platform in Visual Studio 2017. Everthing works, as I could basically use the same cmake-files as I used on the Linux-platform. However, in Linux I used the package manager to install libzip. I do not have that option in Windows. I somehow need to build a Windows-version for libzip and include the files (header files and lib files) in my CMakeLists.txt file. Can someone help me with a step-by-step guide for this?
Take a look at vcpkg. It is a package manger for the Windows platform. It builds and installs many open source libraries for Windows. libzip is mentioned specifically as one of the ports.
Is it possible for you to use the Nuget Package Manager within Visual Studio?
right click on your solution
select "Manage packages for your solution"
search for libzip
select lipzip and click install
you should now be able to #include "zip.h"
I have a VS 2017 C++ linux app which is deployed to the Bash on Windows linux subsytem in Windows 10. I have included header directories using the C++ project properties 'Additional Includes'. However when the project is compiled, the compiler complains that it cannot open header files. As the source files are being compiled on the target machine as opposed to locally, I assume the header files need to be copied there as well but what setting is required for this. Currently they are not being copied, they can be browsed to in the IDE however
Thanks
Tested on Visual Studio Community 2017 15.9.7 and Visual Studio Enterprise
2019 Preview 4.
Visual Studio needs to download all remote headers in your localmachine for correct behavior of intellisense.
New method 'rsync_ssh' doesn't download all headers. You can use old method .zip via sftp_ssh.
0. Add remote connection.
Tools->Options->Cross Platform->Connection Manager
1. Select your connection
Update from Tools->Options->Cross Platform->Connection Manager->Remote Headers Intellisense Manager.
Next click on Explore button.
2. C:\Users[YourUser]\AppData\Local\Microsoft\Linux\HeaderCache\1.0[IdNumber]
Rename the HeaderCache settings.xml.unused file to settings.xml
3. In the settings.xml file Change the syncMethod to sftp_ssh.
4. Update headers cache from Tools->Options->Cross Platform->Connection Manager->Remote Headers Intellisense Manager.
5. Enjoy.
Before
After
Visual C++ for Linux Development (VCLinux) doesn't copy headers to the remote (Linux) system that are not in the Visual Studio project.
VCLinux installs copies of most of the common Linux system headers (/usr/include etc.) on the Windows host so that IntelliSense can see them but the system headers for the Linux system must be present on the remote for your application to compile (with g++). System headers are on the include search path for g++ by default. And the VCLinux copies are on the Visual Studio IntelliSense include path by default. If you have had to specify Additional Includes it suggests that the headers you're interested in belong to some optional component which you'll probably have to explicitly install on the Linux remote.
It's worth remembering that Windows Subsystem for Linux (WSL) is still limited, i.e. it doesn't (yet) have everything you would find in a conventional Linux distro like Debian. And while grabbing the missing headers from somewhere could allow your application to compile it might to fail to link or run.
This might also be of interest: Linux header file not recognized in Visual Studio 2017 Linux Project
I want to compile CLOGS library.I follow this manual.
I use Visual Studio 2010,python 3.4 in windows 10 x64.
I didn't know anything about waf building system.I didn't know how to set Boost's include path. So I copy boost to the include path of msvc 10.
when I run python waf configure --without-xsltproc --msvc_version="msvc 10.0"
the result is
It found foreach.hpp but not found program_options.hpp.But they were at same folder.
Visual Studio 2013 (for x64 environment)
boost 1.61.0
clogs 1.5.0
Do install boost prebuilt binary for your VS version(Not source version)
Prebuilt binary should have lib64-msvc-12.0 folder that has boost_program_options-vc120-mt-1_61.lib for program_options build testing.
Set two windows global environments
INCLUDE=C:\yourboostroot;C:\youropenclheaderpath
LIBPATH=C:\yourboostroot\lib64-msvc-12.0;C:\youropencllibpath
Open VS2013 x64 Native Tools Command Prompt
Go to your clogs source root and type
python waf configure --without-doxygen --without-xsltproc
in this case I do not need cl-headers configure options
I am importing a C++ project that was created in Visual Studio on a Windows machine, into my Code::Blocks IDE using Linux Ubuntu 13.10. After importing the .sln file, Code::Blocks was able to detect the files but it could not read them due to the \'s in the .vcsproj file (which was created in VS on the Windows machine).
After replacing all of the \'s in the .vcsproj with /'s, everything works fine, but was this the correct solution? This is an open source project, so I wonder if there is a platform-independent solution, or should we expect each user to build the project themselves? Should the .vcsproj or .sln file be excluded from the repository?
Welcome to the world of cross platform development!
Consider using something like Cmake or Premake to generate the project files for the platform you are developing on.
This way any developer can take the CMake\Premake script and generate vcxproj files if they are on Windows or Codeblocks proj files for Linux/Windows, or even Gnu Makefiles if they are so inclined.
I am using visual studio 2013 with ISLE 2013 to create a windows form application,
it is the first time i use this style,
I successfully built the application but the problem comes after i setup the application on another PC is says msvcp120.dll is missing!
I have searched the web for this problem and I could not find anything?
any ideas?
I am not a windows guy but I will try to answer, as I did some small research. I found information here. It says:
"This file is the dynamic linking library designed as a Microsoft C Runtime Library, usually comming with Microsoft® Visual Studio®. It is a collection of link libraries that contains instructions for the standard C library functions. It is used by almost all Windows programs compiled from C or C++ source code. This library is used for the applications written under Visual Studio."
So, I am guessing it is a microsoft thing. A runtime library that is required to run c/c++ projects built with visual studios. Download the .dll from a source online (just google) and include it into your project directory. If it helps, include that file in your installation file.
Until anybody who is working with windows and has any idea about that dll answers you question, this answer can help you to get started.
found the solution I should add the Visual C++ runtime library installer
Don't download single DLL's from which you know hardly anything from random sites.
From your Visual Studio 2013 installation directory, check C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033 and you'll see vcredist_x64.exe and vcredist_x86.exe files that need to be run on your target system.
Use the x64 variant for 64 bit apps. It will install MSVCP120.dll for one, and some other DLL's as well.
Msvcp120.dll is the dll for standard c++ library. When you develop an application using standard c++ in VS 2013, the application defaults to Msvcp120.dll(Msvcp110.dll in VS2012). The client computer should install Visual c++ 2013 Redistributable.
Some dependencies that are on your system because you have Visual Studio installed will not be on the target system. You will need to include them in your installer or install a redistributable package on the target machine.
As there are many options and listing them all here would be too much and also redundant, you may want to visit the Microsoft site for this task and read up on all those options before you decide which you chose.
You can download the .dll file from DLL Store and paste that file into the directory where you have installed the setup.
Hope it will help you.