Cannot find the path for used header in new project with Visual Studio 2013 - c++

I recently used opencv for my C++ programs. I followed the steps of the tutorial which is about setting the path for opencv.
The header files and functions all worked in my first project.(It's needed to set configurations in an empty project)
However, when I am to create a new project, the compiler cannot find the headers and files of opencv. Should I set all stuff again for a new project?
Or is there any other method to help?
Thank you very much.

Visual studio settings are per project, they do not transfer over to different projects.
Set them again.

Related

make visual studio add all necessary when building release

So I am working on an example project that displays video from a network stream.
The project is in C++.
After building the project in release, and trying to run the project on a different computer, I get errors on missing DLL files.
These DLL files are located within the installation location of Visual studio.
one example is msvcp140d.dll.
After copying all the missing files, I get a generic error with no specific file.
So:
Is there a way to tell visual studio to add all relevant files when building the project?

Linking SDL 2 VS Code project with Easy C++ Project

I created a fresh project in Visual Studio Code with Easy C++ Project.
I tried to link in SDL2 (downloaded the source from their website), but it feels like I'm missing a step?
IE SDL_Main.h is not found? So I guess it either badly linked or I need to build it? I'm really not familiar with build/make/project setup usually work in V Studio in a already setup project...
Can someone guide me?
after installing the library and setting up the path in properties.json, use
#include
instead of what you used.

Run C++ analysis with VS solution file

I want to analyse a more complex C++-Project with SonarQube (v4.4) and the Cxx-Plugin v0.9.1 (Community C++).
It includes many sub-projects in different directories.
I got a VS2005 solution file (*.sln) which referes to the relevent *.vcproj files or alternativ mwc + mpc files.
I was now wondering, what the best way to do this analysis is.
Sure, I could write a sonar-project.properties file manually with all directories.
But isn't there a possibilty to run the analysis using the given workspace / project files I got? I could think of e.g. Sonar-Runner readout information from that files to create modules with given direcotry (and maybe automatically includes the defined addionaly includes).
I found Plug-Ins like "Analysis Bootstrapper for Visual Studio Projects Plugin" or the .Net-Plug-In, but obviously they don't support vcproj files.
Thanks for any help and best regards
Visual Studio comes with C++ static code analysis, but for 2005/2008 you need the team edition. 2010/2012 it is available in the premium edition. It is now available in the 2013 professional edition.
Otherwise I would look here

Making a GCC based Project Build and Run under Visual Studio 2010

I have been trying to port my C++ based mass data transport protocol project into visual studio 2010 with no success :(
The code I have been working on is fully compatible with Win based systems..well this is what my mentor also says :) But I have not been able to make the project build and run using my existing *.h & *.cpp files under VS 2010.
The Project basically is a API under which i have 4 separate applications. The hierarchy would be:
SRC FOLDER- all the *.h and respective *.cpp files
APP FOLDER- 4 applications (the API / library and some *.h files to be available before linking such as the final dll file under SRC folder & the main header file under APP folder)
I do also have a makefile as when the project was developed on Linux platform but I have no idea how to implement the same on Visual Studio 2010
FYI: VS 2010 on compiling reports that there are missing header files such as <cstdlib>, <unistd> but my best bet is this is not the real prob. but the prob. lies in the way I make the project build itself. I don't know should I go with making a dynamic dll project for the main library and then make the 4 empty c++ projects inside that for the 4 respective applications..?
Cheers,
echo9
I would recommend that you parse the data that you need from the working .mak file that you used previously. Create an empty project & sln, then add the contents of the "src" by using "add->existing files" in the file menu.
At that point open up the project configuration settings and go through the C++ and linker settings one by one. At each step have a look at the linux .mak file and see that you are choosing equivalent options and path settings. In particular make sure that you add all of the necessary include paths to where your .h files are.
That's what I would do anyways... same process as porting forwards old MSVC4 .mak projects to a modern version.

How to make a single static library from multiple static libraries?

We recently converted a C++ project from Visual Studio 6 to Visual Studio 8. Everything went well until we reached the compilation of a project who put all the static libraries inside one big static library. By default after the conversion between the two version of projects the project didn't do anything (no big static library was created, it only said that the project was up-to-date).
We found a working solution by adding a dummy (empty) file to the project (it had no other files before, in the Visual Studio 6 solution). Everything went well and we managed to compile the project with the new development environment (Visual Studio 8).
My question is: Is there any other way to do this, without dummy files added to the project?
Thanks in advance for your responses
You can use the method described in the answer by nobugz also with multiple configurations and different directories for debug and release input libs. Just add all input libs, debug and release, and use "exclude from build". In the debug configuration exclude all release input libs from the build, in the release configuration exclude all debug input libs.