What is the complete directory of the visual studio include paths ? For example, they are listed as
$(VC_IncludePath);$(WindowsSDK_IncludePath);
under VC+ Directories - Include Directories. But where is VC_IncludePath ? I tried looking up my environment variables on powershell but there was no listing of those paths.
Related
I am trying to build Lua (version 5.3.5) with Visual Studio 2019. For this, I am following the instructions given here. The steps that I have followed are as follows:
Set up environment variables as mentioned below
UTIL_DIR = C:\Program Files\utility
LUA_DIR = C:\Program Files\lua\5.3
LUA_CPATH = ?.dll;%LUA_DIR%\?.dll
LUA_PATH = ?.lua;%LUA_DIR%\?.lua
SDK_DIR = Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133
INCLUDE = %SDK_DIR%\include;%SDK_DIR%\include\usr
LIB = %SDK_DIR%\lib;%SDK_DIR%\lib\usr
Created the folders required, as mentioned in the environment variables
C:\Program Files\utility
C:\Program Files\lua\5.3
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\usr
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\usr
Added C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin to the environment path variables
Downloaded lua-5.3.5 from here, untarred it and stored in C:\dev\
Added the build.bat file given in this image in C:\dev\lua-5.3.5\src\folder with the 5.1s replaced by 5.3s
In the command prompt, executed the command C:\dev\lua-5.3.5\src>build
I am getting error for every line of build.bat. The entire error screen is shown here.
Please tell me what is going wrong and how to resolve that.
**P.S. - ** I think my SDK_DIR variable is not pointing to the correct folder.
However, I don't know what the correct folder should be. There are
many bin, include and lib directories in Microsoft Visual Studio\2019\Community\.
What I want to achieve:
A clean build directory generated by CMake for Visual Studio, with build system targets like ALL_BUILD and ZERO_CHECK and additionally created directories like Visual Studio's x64 physically located somewhere else than in the root directory.
What I have tried:
As the accepted answer at CMake: How do I change properties on subdirectory project targets? points out, all I have to do is activating the use of folders with the following line.
set_property(GLOBAL PROPERTY USE_FOLDERS TRUE)
The problem:
This does only create a folder in the visual studio project structure for CMakePredefinedTargets, not in the physical filesystem. And the x64 directory keeps untouched too!
So what do I have to do?
I have a simple empty Visual Studio 2013 C/C++ project to which added two files:
MyCode.cpp
MyCode.h
Inside MyCode.cpp, I have as the first line,
#include "mex.h"
mex.h is a MATLAB file located in C:\Program Files\MATLAB\MATLAB Compiler Runtime\v717\extern\include
I have gone to Project Properties -> C/C++ -> General and added "C:\Program Files\MATLAB\MATLAB Compiler Runtime\v717\extern\include" to my "Additional Include Directories".
And yet, VS never finds the file!
File 'mex.h' not found in current source file's directory or in build system paths.
It seems that the build system paths are not being updated with my additional include path.
I've tried using relative paths as well, deleting the .sdf file, and closing/reopening Visual Studio. It simply won't add the path.
For reference, this works fine in Visual Studio 2010.
Help!
What's the difference between VsDevCmd.bat and VsMSBuildCmd.bat in Visual Studio 2015 (CTP 5)?
Both located in C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools aka VS140COMNTOOLS.
Looking at the code for VsMSBuildCmd.bat, it sets VS140COMNTOOLS environment variable from the registry, and also adds MSBuild in the PATH.
VsDevCmd.bat does the same plus it adds a bunch of other directories in the PATH and sets a few more environment variables, most of which are used by Visual C++ compiler. Also adds path to TypeScript Compiler.
I'm using Visual Studio 2010 and I want to code with DLL files.
I adjusted the system environment Path, like C:~~, but execute file can't find DLL files. So I moved the DLL files to c:windows\system32. Then I can use it.
Why can't that find DLL files? I want to know how the computer loads DLL files by using the system environment path.
My path setting is:
%OPENCV_DIR%\bin
(there are DLL files in bin folder)
(OPENCV_DIR = C:\opencv\build\x86\vc10)
and i'm testing Opencv