I'm trying to compile a sample from the nVidia website to do solid wireframe rendering:
http://developer.download.nvidia.com/SDK/10/direct3d/samples.html
When I open the VC++ project in Visual Studio 2012 and compile, I receive this error message:
Error 5 error MSB4064: The "CommandLineTemplate" parameter is not supported by the "FXC" task. Verify the parameter exists on the task, and it is a settable public instance property.
Am I missing a framework or SDK? Or perhaps this sample needs to be modified to work with VS2012?
Many thanks!
Do you have the latest DX SDK installed?
Also, is it possible that there is a custom compile action for VS to run FXC (shader compiler) that you are missing?
If you can find the parameters needed to compile their shaders via fxc, you can run it via the command prompt and is located in the bin folder of the DX SDK.
Related
I'm trying to build the minimal wxWidgets sample on Windows, using Visual Studio 2019 Commmunity Edition, following the instructions from this page for using wxwidget binaries
I opened the "minimal_vc9.vcxproj" file in Visual Studio. Visual Studio upgrades the project file.
I then added the wxwidgets.props property file to the property manager, and then tried to build ( Build | Build Solution )
It fails with the following error:
1>C:\Users\Administrator\Desktop\wxwidgets\include\wx\msw\chkconf.h(91,1):
fatal error C1189: #error: "wxUSE_UNICODE_MSLU must be defined."
I am trying to help a friend who knows C++ and uses Windows to set this up, but am not sure how to do so. Note both he and I are new to using Visual Studio as well, and I can't find any references on how to fix this by Googling.
Note I am using the project file that came with minimal (no solution file was there), and can see that in it's configuration that it says "Use Unicode Character Set" at `Project | Properties | Character Set"
EDIT: I'm attaching a picture of the IDE/files we downloaded, which I believe are the 3.1.5 version, ie release version as of Dec 4, 2021?
It looks like you're using wxWidgets 3.0, as support for MSLU was removed since v3.1.0 ~8 years ago. Please download 3.1.5 binaries and open minimal.vcxproj project file to build the sample, there is really no reason to use a 10 year old version if you're starting developing with wx.
Also, completely unrelated, but it's considered to be a bad idea to use administrator account for development. wxWidgets certainly doesn't require any special rights.
I
It is very easy to build the library yourself.
Download the source code archive and unpack it in, e.g. c:\wxWidgets
Start msvc, do ^File->Open", navigate to c:\wxWidgets\build\msw and open the file wx_vc15.sln
Select "Build->Batch Build...", click "Select All", then "Build".
When the build is finished successfully, open c:\wxWidgets\samples\minimal\minimal_vc9.sln, let msvc convert it and choose " Build->Build Solution".
Then when everything is ready, create a project as "desktop application", apply the properties file and start coding.
Thank you.
I am trying to profile a CUDA program because I want to verify the sequential performance by using NVTX tools and compare it against it corresponding heterogeneous performance.
I recently found this article and thought I could configure my Project in Visual Studio by myself with the right parameters:
http://http.developer.nvidia.com/NsightVisualStudio/2.2/Documentation/UserGuide/HTML/Content/NVTX_Library.htm
I finally found the way to profile my first program in Visual Studio 2013 Community. The instructions of above (starting from a CUDA Runtime Project) were modified as follows:
VC++ Directories -> General -> Include Directories: $(NVTOOLSEXT_PATH)\include
CUDA C/C++ -> Common -> Additional Include Directories: $(NVTOOLSEXT_PATH)\include
Linker -> General -> Additional Library Directories: $(NVTOOLSEXT_PATH)\lib\$(Platform)
Linker -> Input -> Additional Dependencies: nvToolsExt64_1.lib
Copy the file nvToolsExt64_1.dll located in $(NVTOOLSEXT_PATH)\bin\$(Platform) and paste it in your project directory MyProject/x64/debug
I tried to replicate the Visual Studio steps in Nsight Elcipse Edition 7.5, but I cannot link my NVTX functions (particularly "nvtxRangeStartA" and nvtxRangeEnd) with the correct library (libnvToolsExt.so).
I coded it in Nsight Eclipse 7.5 for Fedora Server 21.
My code is:
#include "nvToolsExt.h"
...
nvtxRangeId_t t;
t = nvtxRangeStart("MyFunction_timing");
MyFunction();
nvtxRangeEnd(t);
CAN ANYONE HELP ME PLEASE?
What do I suppose I have to do?
The Nsight errors are:
undefined reference to 'nvtxRangeEnd'
undefined reference to 'nvtxRangeStartA'
That is either a compiler or linker error. Since you didn't mention an error about not finding "nvToolsExt.h", I'll guess your include settings are correct and it's getting the header file.
That leaves the most probable cause is failed linking. You need to link the library as -lnvToolsExt and the library path as -L{/usr/local/cuda/lib64}
I've listed a linux path, which is specific to my setup. Yours is wherever the CUDA Toolkit is installed, but you really need to verify the correct library is in there. The correct library is libnvToolsExt.so, which is symlinked a couple times.
Go to project settings in Nsight>>Properties for {Project}>>Build>>Settings>>Tool Settings>>NVCC Linker>>Libraries
Libraries(-l) should have nvToolsExt
Library Search Path(-L) {filesystem path}
Please edit your post with any additional errors from the build console.
This is my first post, please accept my apologies if I am unclear or fail to completely abide with posting rules. I have in any case sought far and wide in prep for my own question.
Working with:
Windows 7 Enterprise version 6.1.7600
Intel Xeon CPU Quadcore 3.07GHz
NVidia Quadro 4000 GPU
CUDA v5.0 Toolkit for Windows x64 build
OpenCV v2.4.4
OpenCV Cuda Package belonging to opencv v2.4.4
Microsoft Visual Studios C++ 2010 Express ('vc10')
(!) Without CMake (!)
steps, tutorials & checks I've done:
I have installed and configured software I required for opencv 2.4.4 following the opencv.org tutorial....
with vc10, following the opencv.org tutorial on building opencv in vc10 (applying the there-described global method and placing the gpu-related dlls on top), but
I have not installed CMake software and never had any need for it, until I attempted moving calculations to the gpu.
I've furthermore copy-pasted all the .dll files I'm applying in this
vc10-solution into the 'Debug'-folder (placed in the same folder as where
the .sln file of this solution is).
Lastly, I've followed the NVidia developer Zone CUDA 5.0 Getting Started
Guide up to the 'Verify Installation' paragraph, with successful outcome, and also configured the Build configurations to include CUDA compilation following the 'build customization for existing
projects' instructions.
This question is about trying to speed up a win32 console .cpp that I've made in debug-mode (i.e. an visual studios solution using the win32 OpenCV library a rather simple image processing project, but with a blur with a large kernel that's taking much time) by making it run on the gpu. However, I am experiencing trouble running opencv with cuda 5.0 (even though OpenCV Cuda Package's readme.txt tells me to download and install Cuda 5.0).
Upon compiling and running in vc10 (=hitting F5, with Win32 Platform) - or likewise upon running the corresponding .exe executable-, I get an system error saying that "The program could not be started because cudart32_42_9.dll is missing on my computer".
Apparantly , even though opencv's readme tells me to use cuda5.0, it's still looking for the cuda-libraries belonging to 32bits cuda 4.2 toolkit (cudart 32 _42_9.dll) - and obviously not finding them because they're not installed.
In this question it is mentioned that OpenCV v2.4.4 simply hasn't been compiled with cuda 5.0 and the only way to make this run is to compile my own libraries using CMake.
My Question:
I am wondering if in the meantime allowing OpenCV v2.4.4 to run using x64 cuda 5.0 has become possible but WITHOUT having to compile my own libraries using CMake.
I would kindly like to ask any of you to share with me precisely what steps to take. In your solution, please write in detail, as this is only my third week of using C++ language, compilers libraries dlls and all such.
Many thanks in advance!
EDIT
This question has actually now (due to #talonmies 's comment) become much more like a question asked by
user 'duttasankha' titled 'OpenCV with cuda MS Visual Studio 2008', and
user 'zebullon' titled 'Do I need a 64 bit SDK on a 64 bit machine'.
In order to fully answer my own question:
I have been able to get CUDA 5.0 running without having to compile anything myself (e.g. without having to use CMake) or reinstalling any GPU driver software.
I followed - amongst others – duttasankha and zebullon’s posts (I named these in the EDIT in my question) and took an extra, small leap of faith.
I downloaded the 32 bits CUDA 4.2 SDK (software development kit, available on the same site as the other CUDA downloads) and
installed/extracted it. This is noteworthy because I had a newer
CUDA Toolkit and driver version (5.0) installed, which was 64bits!
I looked (windows search function) for where the SDK files had been
extracted and found cudart32_42_9.dll in the C:...\My
Documents\NVIDIA GPU Computing SDK 4.2\C\common\bin folder.
I copied all of the 32bits dll's in this folder (all the dll's
whose names end on '32_42_9.dll') and placed them (together with
the opencv-dll's I mention in the summary in my question above) in
the folder named 'Debug' which is positioned in the same folder in
which the .sln solution-file of this project is (this is the folder
where Visual Studios always places the .exe executable files
belonging to the project). I copied all of them because even though
I only got the message that this one cudart-dll was missing, the gpu
functions in opencv need all of the copied dll’s.
I had already completed the directions concerning the required
Visual Studios settings. (see opencv.org tutorial on enabling Visual
Studios 2010, doing so the global (not local) way, also see this
guide.
But now, in the Linker; Input; Additional Dependancies field I completed my
dependencies list with the cuda-related libraries. It looked like
this: C:\opencv\build\x86\vc10\lib\opencv_gpu244d.lib
C:\opencv\build\x86\vc10\lib\opencv_core244d.lib
C:\opencv\build\x86\vc10\lib\opencv_highgui244d.lib
C:\opencv\build\x86\vc10\lib\opencv_video244d.lib
C:\opencv\build\x86\vc10\lib\opencv_ml244d.lib
C:\opencv\build\x86\vc10\lib\opencv_legacy244d.lib
C:\opencv\build\x86\vc10\lib\opencv_imgproc244d.lib Notice that the cuda-related lib’s 'opencv_gpu244d.lib' and 'opencv_core244d.lib' are at
the top of this list. (Incidently, this core244d.lib is
cuda-related, because this is the opencv core library that came from
the OpenCV-2.4.4-CUDA-vc10.7z package I downloaded from
Sourceforge.com . Instructions for unpacking/ correct placement are
available in the accompanying .text-file in this 7z package from
Sourceforge).
In Visual Studios , in the Project-Folder Explorer, I rightclicked on
the name of my project (=vc10 solution) and choose
Build-configuration. Here I placed a check in the CUDA 5.0(.targets,
.props) which showed corresponding path “
$(VCTargetsPath)\BuildCustomizations\CUDA 5.0.targets “.
Now, running my code does not prompt any more system errors concerning missing DLL’s and the CUDA ‘Initialization and Information ‘ functions from the opencv.org documentation are also functioning in a new test-project I made up to check global functioning of the CUDA set-up.
Apparantly, the Driver and CUDA Toolkit of a newer version know how to cooperate with the DLL of the older version CUDA SDK.
Hope someone else will save some time when they read this. If I missed details in my description of the answer, please let me know.
Hello I downloaded Z3 from http://z3.codeplex.com/ and then opened the Z3 solution in Visual Studio 2012. (While I'm not totally new to VS I haven't used it in over 10 years). There are 9 projects in this solution but I am having a hard time telling which I ought to be using. I can guess at some of them, but others aren't very clear. Eg. what is the difference between Microsoft.Z3 and Microsoft.Z3V3 ? Can anyone briefly explain what the different projects are and which ones to build?
Anyway just for kicks I tried building the top level solution but got the following errors
Error 1 error RC1015: cannot open include file 'afxres.h'. C:\Projects\z3-src-4.1.2\z3\dll\dll.rc 10 1 dll
Error 2 (same as Error 1 except in shell.rc)
Error 3 error LNK1104: cannot open file 'C:\Projects\z3-src-4.1.2\z3\Debug\z3_dbg.lib' C:\Projects\z3-src-4.1.2\z3\test_capi\LINK test_capi
Trying to build just the MS.Z3 project still gives me Error 1.
My eventual goal is to invoke Z3 from say an F# program. Can someone provide some guidance for how to do this?
Any help would be appreciated.
EDIT
This answer reflects the directory structure used in Z3 version <= 4.1.1. In version 4.3, the code base has been reorganized/simplified.
END EDIT
Which version of Visual Studio are you using? I'm asking because I want to reproduce the behavior you described.
The easiest way to build Z3 is described here.
You should use the Visual Studio Command Prompt, and execute msbuild. It seems you tried that, and got errors. Here is a short description of each project folder:
lib: the Z3 source code is here. This is the important folder. For visual studio users, it generated a static library.
dll: project for wrapping the static library as a Windows DLL. This is irrelevant for users in other platforms.
shell: uses the static library from lib to build z3.exe.
test: a bunch of unit tests. It produces test.exe.
Microsoft.Z3: .Net API. It is the official .Net API (C#, Visual Basic, F#, etc) for Z3. This is the API you should use with F#.
Microsoft.Z3V3: It is the old .NET API. It was the API available in Z3 3.x. We maintain it because some users still use it.
test_capi: Application that tests the Z3 C API.
maxsat: Small application that implements two maxsat algorithms on top of the Z3 API.
I installed opencv2.0 and I am using MSV c++ 2008 v9. I tested some code online that return the inverted version of a singel static image, but I would like to see the FaceDetect code working as well. I tried following the instructions in the wiki but I get a memory alocation error coming from a file I am not supposed to edit. I wanted to know if anyone wants to or has tried doing this and could share some insight into how to accomplish the test of this already provided code. My main problem at the moment is that there is a lot of junk out there about working with openCv1.0~ and other versions of MVS, but I want specifics to my version.
Thanks for the help in advance,
Bc
Assuming that you have already installed OpenCV2.0 and compiled it using MSV C++ 2008 successfully. Now to execute already provided code you can either directly execute the facedetect.exe command located at "C:\OpenCV2.0\vs2008\bin\Debug\" assuming you have installed OpenCV2.0 in it's default location.
Syntax : facedetect --cascade="C:\OpenCV2.0\data\haarcascades\haarcascade_frontalface_alt.xml" "C:\OpenCV2.0\samples\c\lena.jpg"
OR
You can execute facedetect.exe from "C:\OpenCV2.0\samples\c\" path. specify the cascade classifier name and image.
Syntax : facedetect --cascade="C:\OpenCV2.0\data\haarcascades\haarcascade_frontalface_alt.xml" lena.jpg