Kinect for windows program in VisualC++ can't find freeglut.dll even though freeglut has been installed. Why? - c++

This is my first post to this site. I'm hoping that someone can help me out.
I am doing some work with the Microsoft Kinect for Windows and I am trying to set up visual studio to use GLUT. The code builds successfully, but I keep getting the following error message when I try to run the program in Visual Studio:
The program can't start because freeglut.dll is missing from your
computer. Try reinstalling the program to fix this problem.
I have installed the Microsoft SDK and Developer Toolkit for the Kinect and I am using Visual Sutdio 2010. I followed the instructions on this tutorial, Kinect SDK C++, in order to set everything up, including downloading the freeglut 2.8.1 MSVC Package and copying the appropriate files into various folders as per the tutorial instructions. I have tried renaming freeglut.dll to glut32.dll as the tutorial suggests and leaving it unchanged.
The code I'm using is the sample code from the second page of the tutorial. I've also tried the source code provided in this tutorial: Programming KINECT in C++ and OpenGL — Color Stream Rendering. Both build fine, but yield the same error when run.
I tried deleting the freeGLUT files and replacing them, rearranging their folder structure in the SDK folders (and changing the corresponding filepaths in my project properties) as well as following the solution presented in this post: compiled program cannot find freeglut.dll. So far nothing is working and that last solution actually caused the both codes I'm using to fail building with error MSB3073.
I would appreciate any insight you might have into this issue.
Thank you!

Related

DLL not found in redistributable (biddll.dll)

I’m having difficulty getting the sample code for tws api running. I’ve successfully run it on a borrowed laptop but the same version fails on my own windows 10 laptop. When running on Release mode in Win32, I get the popups
The code execution cannot proceed because biddll.dll was not found. Reinstalling the program may fix this problem. and The procedure entry point ?cancelOrder#EClient##QAEXJ#Z could not be located in the >dynamic link library C:\Eclipse-workspace\TWS >API\samples\Cpp\TestCppClient\ReleaseTestCppClient.exe.
I’ve read through several questions similar to this. I’ve tried installing the Visual C++ Redistributable for Visual Studio 2022 for both x86 and x64 from here: https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170. I’ve tried loading biddll.dll from another folder but it gives the message “Module was built without symbols.”. I’ve run “sfc /scannow” for broken files. The issue persists. biddll.dll still seems to not be anywhere in the system files or the API files. The only version is the one I copied from another version of the project.
Thanks for your suggestions. I uninstalled TWS API and reinstalled it. I made sure to build for Release. It sounds like there was a mismatch between some debug libraries and it started pulling them instead. There may have been some unexpected behavior from installing several versions while troubleshooting as well.

Integration of Armadillo in x86 C++ Application in Microsoft Visual Studio

since last week I'm working with the "Armadillo" C++-library.
I started with a default 64-bit C++ application in Microsoft Visual Studio. For the installation I followed the steps in the post below:
How can I install Armadillo on Windows?
Following these steps, everything worked fine for me.
But now I have to expand my C++-application and have to include/integrate another .dll. The problem for me is, that this .dll is a 32 bit .dll. So when I try to call it in my 64-bit application, which uses the Armadillo library, I always get the "class not registered"-error. This is why I want to migrate my whole project into a x86-application. But for some reason I'm not able to migrate the Armadillo-library into this x86-application (Following the instructions in the link above doesnt works anymore). While building the programm I always get more than 50 "LNK2019" errors.
Does anyone know how to fix the problem and know who to integrate Armadillo into a 32-bit application?
Thanks for your help!!
Solved it.
For me it works with replacing the x64-bit "libopenblas.lib" and "libopenblas.dll", which are installed from Armadillo by default, with the x86 "libopenblas.lib" and "libopenblas.dll", which are included in the "OpenBLAS-0.3.15-x86.zip" download file from the OpenBlas release page on GitHub:
https://github.com/xianyi/OpenBLAS/releases
Probably it is enough to only replace the "libopenblas.lib" file.

CUDA opencv building fails - missing file that is actually there

I am trying to do the following: getting to work
CUDA 9.1 with
openCV 3.4.2 and
Visual Studio Enterprise 2015 (v 14.0 Update 3) on
Windows 7 Enterprise x64 SP 1 using
CMake 3.12.0
and also searching for others with the same problem - no success there.
I have worked through this tutorial on getting the software to work together. I do not intend to use Intel MKL and TBB.
I have succeeded in
installing CUDA
generating the Makefiles for openCV with CMake, and having the CUDA libraries included without any mistakes (barring the download of optional stuff, as the PC I am working on is to stay off the internet)
generating the .sln solution file for building openCV in Visual Studio
The problem is in the next step - building openCV. The compiler claims that "opencv2/opencv_modules.hpp" cannot be opened by gpu_mat_cu when it tries to build opencv_world. The thing is that the include path works according to Visual Studio - it detects the right file in the gpu_mat.cu. The project (opencv_world) has the right directory in its include paths as static path.
I am new to Visual Studio (I worked in Linux with QT, CUDA and openCV before), so I am not too sure I am not missing some kind of settings I should change.
The opencv_world.hpp only consists of #define instructions. I have tried deleting the include of opencv_world.hpp and instead just defining the parameter in gpu_mat.cu itself, but if I do, the next include (that, again, VS finds the path to without problems) is not resolved.
I guess there is something obvious I am missing, but I don't seem to be able to resolve this issue, so thanks in advance for your help.
Cr4sh
P.S.: The files CMake wanted to download for openCV and failed at (obviously; no internet connection) are: opencv_ffmpeg.dll, opencv_ffmped64.dll, ffmpeg_version.cmake, ippicv_2017u3_win_intel64_general_20180518.zip, res10_300x300_ssd_iter_140000_fp16.caffemodel and opencv_face_detector_uint8.pb
I'd add the CMakeCache.txt file in a spoiler tag, but it has too many characters. If you think it would help, let me know and I'll upload it somewhere.
I got the solution, just in case someone stumbles over the same problem: it's the most simple thing that everybody knows until they don't - my include path contained a white space that apparently somewhere was treated as a String divider for whatever interprets that path.

Debugging Qt in visual studio, msvcp140d_app.dll is missing

I'm new to Qt, but have been working with Visual studio for C/C++ development for a few years. Now I'm trying to build a GUI for my project. I installed Qt 5.11.0 and the Qt VS Tools on both my work computer and home PC. At work I can build and run my project with the VS debugger, however on my home system I can build but can't run either with VS debugger or simply launching the app. I tried in release and it runs fine.
The error I'm getting is :
The code execution cannot proceed because VCRUNTIME140D_APP.dll was not found.
I get 4 of these, the first two want VCRUNTIME, the second two want MSVCP140D_APP.dll.
Solutions I've tried so far :
Uninstalled Win SDK and reinstalled
Uninstalled VS2017 and SDK and reinstalled
Searched System32, SysWOW64 and VS install directories - found msvcp140d.dll and vcruntime140d.dll, but no _app.dlls
Does anyone know what these are included with and where to get them? I can't figure out why I have them on my work computer but not at home. I have the same VS updates, same Qt version, and SDK on both systems.
Using :
Visual Studio 2017 v15.7.1
Qt 5.11.0 - msvc2017_64
I suppose I can just copy the .dll's from my work pc and drop them in the appropriate locations on the other, but I'd like to know what they should have been installed with so I can have the same setup on both systems.
Edit:
I also tried changing the platform toolset to VS2015 with Qt versions msvc2015_64 and winrt_x64_msvc2015
I found this post concerning the same missing _app.dll files. There wasn't any answer there, which is why I tried reinstalling the SDK in the hope the missing files were included there.
Edit 2:
I just scanned my entire system at work and it turns out that I don't have the missing .dll there either. That tells me that there is a difference in the project properties or configuration between the two. I use git for source control, and I am currently the only contributor to this project. When I try to build and run just the example from the getting started guide I have the same problem at home with missing _app.dll files, however it works fine at work. I'm totally confused now, and any hints are greatly appreciated.
Solution:
After trying for a couple of hours making new solutions etc. I decided to delete the entire build folder and put fresh copies of all the dependencies into it. My project now runs fine in debugging mode.
I'm fairly certain that when I originally copied the Qt .dll files into it I must have grabbed them from one of the winrt folders rather than the msvc2017_64 folder. To test I replaced the working .dll files with those from the winrt_x64_msvc2017 folder and sure enough the same errors again. So, this was a dumb mistake on my part, but hopefully it'll save someone else a lot of hair-pulling in the future.

OpenCV in Code::Blocks: The application was unable to start correctly (0xc00000be)

I set up OpenCV with Code::Blocks as per this tutorial: http://kevinhughes.ca/tutorials/opencv-install-on-windows-with-codeblocks-and-mingw/.
I've got as far as building the test program at the end successfully, but when I try to run it I get the following error: "The application was unable to start correctly (0xc00000be). Click OK to close the application."
The one thing that is certainly different from the tutorial for me is that I'm working with OpenCV 3.0.0, Code::Blocks 13.12 and the latest version of mingw (number not obvious from their website or the installer).
I found that other people had had this problem in the past, e.g. The application was unable to start correctly (0xc00000be)
However, it has been a long time since that thread was active, I'm working with newer versions of the software and, most importantly, the answer given there didn't help (I compiled openCV with the same mingw that I'm using with Code::Blocks), so I thought this question would be worth asking (sorry if it's not, I'm rather new to this).
Could anybody suggest a fix that might get rid of this error?
A few other things to note:
I didn't download the Code::Blocks that came with mingw as I was advised against it, I got them separately as per the tutorial
I have installed OpenCV and Code::Blocks on my E: drive, though mingw is still on my C:.
I have added both mingw and OpenCV to my PATH variable, and mingw to my Path variable
I have linked the libraries in both the main compiler settings for Code::Blocks and the Build Options of my project.
I'm working from a 64-bit Windows 7 Laptop, but I have done everything 32-bit style as advised in the tutorial.
Thanks in advance!
So, one solution I've found to this problem is to copy all the .dll files from "...\opencv\build\x86\mingw\bin" to the project file (build directory).
Having done that, the project will run fine. This still doesn't (directly) explain why it wont run without those files (at least, several sources including the tutorial imply it should), and so isn't really optimal. I will continue to look for a solution for this so I don't have to clutter every opencv project I make with the .dlls.
However, for anyone simply wanting to get stuck into coding who is having this problem, I recommend that solution.