Where is $(CudaToolkitBinDir) defined in VS2012 - visual-studio-2012

I just installed cuda 6.5 on my computer alongside 5.0 and 5.5, which was working fine. However, the variable/macro $(CudaToolkitBinDir) still points to the 5.5 path. $(CUDA_PATH) is correctly defined as the 6.5 path as well as are all variables that extend it (INC_PATH etc.). The family of macros that aren't capitalized (CudaToolkit____) are still set to 5.5.
I've checked:
the system (Windows 7) environment variables (has the CUDA_PATH family)
the user Property Pages -> User Macros
the Nsight options
Googleing CudaToolkitBinDir didn't turn up anything. I've reinstalled cuda 6.5 to no avail.
Where is the definition located or how can I reset it?

The answer was as follows:
Right click on the project. Select Build Customizations... Select the correct Cuda version.
D'oh!

Check the registry to see if there is a key named InstallDir under HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\GPU Computing Toolkit\CUDA\v11.5.
If it does not exist, increase it and its value is the installation path of CUDA. like this: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5.
Remarks: replace v11.5 with your CUDA version

Related

.xll Add-in isnt work without Visual Studio full version installed

UPDATE*
I made a excell addin (.xll file), with some math functions, compiled in c++, and it works normally in my computer. Well, when i try send to other person, isnt work. Excel's show a message like the file is corrupted, and when we try open it, open a sheet with some codes/words/symbols
I've tried to find a solution, but to no avail. But I found out what's the really problem.
After install Visual Studio (full version) in this machine wasn't working, the xll addin works!
So, I think I have a program, feature, component that I installed together with the visual studio (full version) that made the program run. I tried the SDK but was unsuccessful.
Could you help me please? I attached 3 images, one with the addin working and 2 with erros.
PS: i tried compiling version 32 bits and x64, for both excells, and happens in both excels (32 & 64 bits)
erro 1
erro 2
working
A colleague ask me to uptdate with the results of -dumpbin /dependents Addin.xll
Follow bellow:
File Type: DLL
Image has the following dependencies:
KERNEL32.dll
USER32.dll
MSVCP140D.dll
VCRUNTIME140_1D.dll
VCRUNTIME140D.dll
ucrtbased.dll
Summary
1000 .00cfg
3000 .data
4000 .idata
1000 .msvcjmc
A000 .pdata
29000 .rdata
2000 .reloc
1000 .rsrc
70000 .text
32000 .textbss
1000 .tls
1) Make sure what you send out to other persons are release builds, not debug ones.
2) Users who do not have the VC++ runtimes installed already will need to install the appropriate x86 (32-bit) or x64 (64-bit) redistributables from The latest supported Visual C++ downloads page (where the bitness depends on which x86 vs. x64 version of the XLL you send them, not on the bitness of their Windows installation).
MSVCP140D.dll
VCRUNTIME140_1D.dll
VCRUNTIME140D.dll
ucrtbased.dll
The 'D' suffix in those DLL names stands for "Debug". Those are the debug C/C++ runtime DLLs, which are used by the Configuration = Debug builds, and are installed as part of the Visual Studio setup. They are to be used during development, but not otherwise deployed, per Determining Which DLLs to Redistribute:
Debug versions of applications and the various Visual C++ debug DLLs are not redistributable.

How can I fix Microsoft Visual C++ 2017 X64 Minimum Runtime error during installing Redistributable packages (VC_redist.x64.exe, VC_redist.x86.exe)?

During installation I get "The feature you are trying to use is on a network resource that is unavailable" and prompt to specify some path to vc_runtimeMinimum_x64.msi. After providing some path to required file I get error states that this file doesn't match required version Minimum Runtime 14.14.26405.
I finally found the solution reading this question: Install vcredist_x64 with VS2017 installer project
I realized that specific VC_Redist.x64.exe files could be downloaded by links like https://aka.ms/vs/15/release/26405.00/VC_Redist.x64.exe, where 26405.00 is exactly the version I was required to fix. Note, that you need version from error text after clicking OK, not from window title.
And the last point is that this exe must be executed from cmd with argument /repair to help me with this issue. Regular execution by double click made no effect.
I found the solution elsewhere. It said to
Fix problems that block programs from being installed or removed
https://support.microsoft.com/en-us/help/17588/windows-fix-problems-that-block-programs-being-installed-or-removed
download troubleshooter button on the link.
Run it - choose option - have problem with installing - it lists programs - choose the missing / problematic visual c++ runtimes in the list
it will run and get fixed.
Repeat for each visual c++ you having problems with. I ran the program multiple times.
I have to thank this comment section for helping me with this problem, since I have not been able to work more efficently with my school, since I din't know what and if a single file somewhere deep down in the computer had to be deleted for this program to work.

Procedure to build opencv 3.1 from source for Python 3.5 - 32 bit on Windows 10 for Ximea support

I had a lot of trouble while building opencv 3.1 from source code with Python 3.5 -32 bit on Windows 10. For any custom build, its a painfully long procedure which has to be followed meticulously. My purpose was to enable Ximea support with OpenCV for which I needed to custom build it.
Now that I have finally nailed it, I have decided to put the complete procedure here in case someone wants to repeat it. Believe me, it will save a lot of trouble. I will post the procedure in the answer.
Procedure to custom build opencv 3.1 for Python 3.5 - 32 bit on Windows 10
Download Python3.5.2
Install numpy (atleast), scipy, matplotlib from http://www.lfd.uci.edu/~gohlke/pythonlibs/. All libraries should be 32-bit version for Python 3.5 version
Install CMake (3.4.1 or later version recommended)
Download opencv3.1 for windows from http://opencv.org/downloads.html
Extract it to a folder where you want to build the library. In this example it is C:\opencv_310
After extracting, you will get two folders - build and source. Pre-build library has support for Python 2.7. We will need to build the library from source code for Python 3.5
Make new folder. In this example, it is named as 'build_custom'
Open CMake and put path for source code 'C:/opencv_310/opencv/sources'
Put path for building the binaries 'C:/opencv_310/opencv/build_custom'
Click Configure
Enter the path for Python3.5
PYTHON3_EXECUTABLE 'C:/Python35/python.exe'
PYTHON3_INCLUDE_DIR 'C:/Python35/lib/site-packages/numpy/core/include'
PYTHON3_LIBRARY 'C:/Python35/libs/python35.lib'
PYTHON3_NUMPY_INCLUDE_DIRS 'C:/Python35/lib/site-packages/numpy/core/include'
PYTHON3_PACKAGES_PATH 'C:/Python35/Lib/site-packages'
In my case, I wanted to enable Ximea camera with OpenCV so I ticked 'WITH_XIMEA'
Untick BUILD_EXAMPLES, BUILD_PERF_TESTS, BUILD_TESTS
Click Configure
Make sure that 'BUILD_opencv_python3' is ticked on. Click Configure again.
Make sure there are no red lines after configure. Now click Generate.
In my case I was trying to get Ximea camera enabled with OpenCV. For that purpose before buliding solution with VisualStudio, make sure you add 'C:\XIMEA\API\x86\' to Environment Variables first.
Go to folder 'C:\opencv_310\opencv\build_custom'
Click on "OpenCV.sln" and open it in Visual Studio (I had VisualStudio 10 installed on my system)
In VisualStudio, make sure you have 'open_python3' in 'bindings' section
Click on Build -> Build Solution. It will take some time to build all the libraries. At the end of build, it should display "29 succeeded, 1 failed"
Number of succeeded build libraries may vary. But for failed, only 1 should fail where python35_d.lib is not found, mainly because Python3.5 doesnt have debug mode library.
Now change from Debug to Release mode and click on the green arrow next to it.
It will build all the libraries in release mode and this time it should say "30 succeeded, 0 failed"
Now environment variables are to be changed. Go to 'My Computer -> Right click -> Properties -> Advanced system settings -> Environment Variables'
In user variables, add NEW, Variable Name = 'OPENCV_DIR', Variable Path = 'C:\opencv_310\opencv\build_custom'
In system variables, add NEW, Variable Name = 'C:\opencv_310\opencv\build_custom\bin'. Click OK
Check if the changes in environment variables are registered. Open command prompt and enter PATH (check for system variable) and system opencv)
Now go to the folder 'C:\opencv_310\opencv\build_custom\lib\python3\Release' and copy 'cv2.cp35-win32.pyd' to 'C:\Python35\Lib\site-packages'
Now go to the folder 'C:\opencv_310\opencv\build_custom\bin\Release' and copy 17 DLLs to ''C:\Python35\Lib\site-packages'
Copy 'opencv_ffmpeg310.dll' from the same folder to 'C:\Python35'
Now go to the directory where Python is installed - "C:\Python35". Open python console by entering 'python'
Once Python console is open, enter 'import cv2'. You should get no error.
Enter 'print(cv2.getBuildInformation())'. It will display all the build properties for OpenCV.
In my case I was trying to get Ximea camera enabled with OpenCV. For that purpose before buliding solution with VisualStudio, make sure you add 'C:\XIMEA\API\x86\' to Environment Variables first.
Or else you will get error while building the solution - 'xiApi.h' not found.
Common errors
1. Make sure everything is 32 bit
Make sure User Variable and System Variable path are correct (This part costed me a lot of time)
Make sure no red lines are present while configuring CMake
Make sure BUILD_opencv_python3 is ticked on
Make sure 'cv2.cp35-win32.pyd' and all 17 DLLs are copied to the right place

InstallShield adding diffrerent prerequisite for x86 and x64

I want to add different version of Crystal Reports as a setup prerequisite using InstallShield depending on platform. For x86 32bit version should be installed, for x64 - 64bit.
What kind of condition should I add to do so? I've found that I can select particular OS as condition but there is no option to just select 32 or 64 bit.
Thanks in advance.
UPD1: In InstallShield I can choose the following types of condition:
Check if registry entry exists. I wanted to check for WoW6332Node
but then I found that this node can be listed in 32bit OS:
http://support.microsoft.com/kb/2582176 Also I found that I can
check some registry entries
https://superuser.com/questions/290906/check-if-32-or-64-bit-windows-os-via-registry/290929
but I'm not sure that they present in all windows versions.
Check if certain file exists. I can check some file in Program Files
(x86) folder to detect 64bit OS, but it's not a good idea in my
opinion.
I think you can use the VersionNT64 property for this.
More details can be found here:
http://msdn.microsoft.com/en-us/library/aa372497(v=vs.85).aspx
Edit: As it can be seen in the documentation, this property is only set on a 64-bit computer otherwise it is empty.
EDIT: 13.VIII.2014
After the prerequisite has been selected to be added to your installation package, a feature has been assigned.
So, you can go in the "Features" view and select the created feature. I can see it has a Condition field, most likely there you can use the VersionNT64 property.

Visual Studio 2012 - Locals not shown

I am using Visual Studio 2012 with the Intel Fortran Compiler XE 13.0 (from Parallel Studio 2013) to code in Fortran.
When debugging a project, the "Locals" and "Auto" windows don't show any variable. Similarly, when hovering over a variable name in the code, I don't get any datatip showing its value. Lastly, when trying to evaluate a variable or expression in the Watches I always get an "Unable to evaluate expression". So, as far as I understand, there's some problem involving debugger symbols or something like this.
Here's what I tried:
restarting VS and Windows
creating a new solution with default configuration
checking the Debugging options for any obvious setting which could case this
followed this answer, even if it looks like it's for a slightly different problem (VS recognizes a local variable, but saying it's out of scope)
repairing my Intel Parallel Studio XE 2013 installation
I never enabled optimization. Here's a screenshot so that you can clearly see what it's going on here.
P.S: as a last hint, I found a similar bug affecting VS2010, but 1) yeah, I've got VS2012 and I suppose it should have been fixed 2) it affects C++ (don't know if this matters though) 3) the patch is not directly available online.

Resources