Quick question, I'm developing a small program which I'd like to work with Kinect versions 1 and 2. Is there a preprocessor command I can use so that the c# compiler skips my Kinect v2.0 code if I don't have the Kinect 2.0 sdk installed? (When I'm working on Windows 7 for example).
Can I use the C# preprocessor to skip Kinect v2.0 code?
100 views Asked by Wiredchop At
1
There are 1 answers
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in C-PREPROCESSOR
- about "preprocessing" in PintOS compiling(C programming), There are 2-questions for referencing headers and incomplete type error
- Forcing a macro argument to be a string literal
- syntax of macro-like function in C
- How to use a preprocessor to separate parameters from function signatures in C++?
- Using C macro variable in #include
- Placing data at an address given by a constant arithmetic expression
- Preprocessing C code to only use C23 attribute notation
- Consolidating GNU C's and C23's deprecated function attribute
- GCC preprocessor macro and "#pragma GCC unroll"
- Clangd with Gtk on LunarVim emitting too many errors, compiling and executing although
- How to write C macro definition to iterate string and modify characters
- Preprocess ONLY string constant concatenation in cpp file
- Visual Studio Code + Fortran (fortls): CPP #include not recognized?
- Why aren't these header files #include guarded?
- How to avoid conflict between the definition of a function and macro with the same name?
Related Questions in KINECT
- Kinect V1 not connecting to Kinect Studio v1.8.0
- Kinect v1 Camera not connect with Kinect SDK
- There is a conflict when executing 'openni.launch' and 'amcl_demo.launch' in separate terminals
- Kinect Camera not recognized by Raspberry Pi
- Why is "from pykinect2 import PyKinectV2 " not working?
- Accessing Kinect for Xbox 360 depth camera using PyKinect
- Is it possible to rewrite pykinect2 to be compatible with the Xbox 360 Kinect?
- How can I solve R6025 pure vital function call error when I run a sketch of Processing for Kinect v1?
- Gazebo Kinect Plugin Point Transformation for RayShape
- Working Xbox Kinect support within python?
- System.TypeLoadException not load type 'System.Diagnostics.Eventing.EventDescriptor'
- OpenCV StereoCalibrate not returning expected values
- Segmentation fault (core dumped) error when running Python script with pykinect_azure and MoveIt
- Why is my audio file out of order when I try to record audio from the Kinect using NAudio?
- Unable to run pykinect2 on python 3.11.1
Related Questions in KINECT-SDK
- Kinect v1 Camera not connect with Kinect SDK
- C# WPF , Find coordinates according to Virtual Screen resolution
- When use async method to open a form from another from it crashes C#
- Why is "from pykinect2 import PyKinectV2 " not working?
- How can I use Kinect 360 with Windows?
- Cannot access all Azure Kinect Cameras
- Azure Kinect DK Getting: 'Pixels not aligned to stride of each line'
- Kinect V1, setting up environment
- Languages to develop applications for Xbox 360 kinect
- NuGet Restore fails for Microsoft.Azure.Kinect.BodyTracking.Dependencies.cuDNN
- How to get raw Kinect range data?
- How to use a feed from Azure Kinect in multiple applications?
- Transforming 2D pixel coordinates to 3D Azure Kinect
- Human object detection from depth map and skeleton coordinates
- Azure Kinect Crop Out Body Using Body Index Map
Related Questions in WINDOWSVERSION
- flutter Android license status unknown. (command `ver` returned Windows)
- Windows Version (Unable to confirm if installed Windows version is 10 or greater) in stable channel in Flutter
- Why is Winver showing another Version than Powershell?
- How to detect windows 7 in NSIS
- Invalid Windows version when using Inno Setup
- Targeting windows versions in uwp apps
- Checking the Windows version
- How to get Windows version from command prompt or from PowerShell
- Find what windows version is on a specified drive
- C++ Windows version issue with Windows 10 home
- Getting Windows OS version programmatically
- Why does Windows 10 report its version as 6.3?
- Can I use the C# preprocessor to skip Kinect v2.0 code?
- WiX Changing UI items based on OS version
- How to do Conditional Compilation for CSIDL or KNOWFOLDERID in Delphi XE4?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Basically, like this:
Of course, you would have to define those symbols manually, there is no builtin capability in the compiler or framework to detect which version is available, if at all.
You might be able to detect any installed Kinect SDK (version) by using MSBuild. Like for example, look for specific registry keys, paths on your local drives and/or set environment variables and then set those symbols from inside your project files.
For example, include the following fragment on the top of your
.csprojfile (or put it into a separate file that you<Import>).(Mind you, the above if just an example though, no idea what would be good "trigger" to detect the version for kinect).
UPDATE
@Scott Chamberlain comment helped. Actually the Kinect 1.0 SDK sets the
KINECTSDK10_DIRenvironment variable and the 2.0 SDK sets theKINECTSDK20_DIRenvrionment variable.So, you might do something like this (this might help as well):