The application was unable to start correctly 0xc150002 - visual-studio-2010

Hey guys so I have combed the internet trying to find a solution to my problems I had decided I want to learn to opencv and am having a hell of a time to get a basic hello world program working.
So I'll start of with I downloaded the OpenCV2.1 from sourceforge
http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.1/
I am currently running Visual studio 2010 on Windows 7, 32 bit.
So I installed ran the OpenCV2.1.exe file and added OpenCV to my path enviroment, I then build the libraries using cmake and ran through the following instructions
http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010_CMake
When i build the code in the tutorial abovei get a sucesfull build but when I try and start the program i get the "The application was unable to start correctly 0xc150002" error. Anyone have any thought ?
EDIT:
I looked at the event log and this is the information i get
Activation context generation failed for "C:\OpenCV2.1\bin\cxcore210d.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.
Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
C:\OpenCV2.1\bin\cxcore210d.dll

Had the same problem. Indeed I did rebuild the Dlls, but in the PATH environment variable of Windows the old DLLs C:\OpenCV2.1\bin; were before the new built DLLs C:\OpenCV2.1\build\bin\Debug; which meant that always the old were loaded ... Now it works

Related

How do I compile PCSXR source code on Windows into an executable?

TLDR at the bottom.
I've been running an application I've found on codeplex.com called PCSXR. However, I believe a Windows update has caused the program not to function properly or it's missing some Windows Visual Basic add-on since it was fine before I cleaned installed Windows 10 for fixing a problem that recovery couldn't fix.
I've tried version 1.9.92 executable but it has crash issues playing cinematics.
Version 1.9.93, which is most stable and I was using, no longer can read the DLL plugins in the folder. Making it unusable.
After browsing around. I found this post that this person solved the problem using Dev C++ to compile the source code. I've attempted to build it but I keep getting thrown errors. Wrong architecture which I've solved by setting it to 32 bit compile but other errors prevented it compiling.
After Googling how-to around and talking with some other programmers. I've been going back and forth with different tools on how to compile it. Code Blocks, Dev C++, MinGW and an old Git program on Windows to run Bash. I even ended up having missing config.h which is in the header and even winres.h missing.
I somehow managed to compile it through WSL (Windows Subsystem for Linux) with Ubuntu, XFCE4 Desktop through VcXsrv to display XFCE4 through a window. PCSXR starts, has plugins but crashes when I run it. From what I've been told, the error due to WSL not supporting sound. So WSL failed.
I've tried Ubuntu "Try It" CD environment but fails to compile at all.
VirutalBox on latest version no longer works since they disabled it working on my machine since it doesn't have BIOS virtualization setting.
TLDR
I've been following their program documentation but it's not really detailed for Windows users.
So my question is: How do I build, in detailed steps, PCSXR either from updated source code here or 1.9.93 source here into a working Windows executable with its DLL plugins working? What programs I need, what do I type in what, what settings, where I find missing files etc.
I know this isn't probably the best question here but I've been at this for 2 whole days, Googling and asking.
I'm using Windows 10, AMD CPU, 64 bit with no BIOS virtualization support.
I managed to do it by following these steps on this forum post:
You need Dev C++ 5.11.
1).Go to File>Open>Directory of Pcsxr>win32>pcsxr.dev
2).Under Project select pcsxr. Right click and select project options.
3.In Project Options select compiler. Set Base compiler to "TDM-GCC 4.9.2 32bit Release" then click ok.
4).In the main menu of Dev C++ 5.11 look for Execute. Select Compile.
5).Wait for it to compile. If you were successful there should a
pcsxr.exe in pcsxr source directory>win32.
After following the steps and trying out all the most recent versions of the source codes available. This is my research results I posted after.
Thanks for the reply. It really helped a lot.
I've tried the 1.9.93 beta source code "pcsxr-1.9.93.tar.bz2"
(extracted with 7zip) and got a compile error about "#include
" not found.
I've tried the 1.9.94 alpha source code "pcsxr-1.9.94.zip" and it
compiled successfully. I got a "pcsxr\libpcsxcore\gte_divider.h"
missing error when loading the dev file in win32 folder but it seems
to work okay.
I've tried the up-to-date source code (last modification Feb 18, 2017)
and it compiled successfully. I got a
"pcsxr\libpcsxcore\gte_divider.h" missing error when loading the dev
file in win32 folder but it seems to work also. The background logo
that covers the main window seems to be blank grey until I start a
game.
I solved the winres.h issue by getting this missing Windows h Sample
file from github here:
https://github.com/Microsoft/Window...les/Win7Samples/winui/tsf/tsfcompart/winres.h
and just added it to the root of the project folder. I had to replace
'#include ' with '#include "winres.h"'.
I don't know about the built-in plugins source code. Some don't have a
dev file and they always throw errors when compiling. I've managed to
add working third party ones from emulator zone and the ones from
1.9.93 beta release "pcsxr-1.9.93-win32.zip" and managed to get 1.9.93 working great.

Qt 5.2.1 with MinGW 4.8 32bit wont run applications on Windows 8.1

Using Qt Creator 3.0.1, Qt 5.2.1, MinGW 4.8 32bit on Windows 8.1 64bit, I am able to build an application but not run it.
When trying to debug the application (new clean project), the output tells me
This application failed to start because it could not find or load the
Qt platfor plugin "windows". Available platform plugins are: minimal,
offscreen. Reinstalling the application may fix this problem.
follow by a
Runtime Error!
Program C:\Qt\Qt5.2.1\test\debug\test.exe
This application requested the runtime to terminate in an unusual way
etc...
I tried adding the qwindows.dll's under my /debug/platforms/*.dll but no difference there.
Is my problem due to my Windows installation?
EDIT: After trying out #paulm's solution, putting the windows dll's inside plugins instead, nothing changes.
Dependancy Walker tells me that I miss
API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
EDIT2
After adding these DLL's (had to download them from here) and seing I had to change the name of one of the DLL's I downloaded from this site, I now get the new error
This application failed to start because it could not find or load the
Qt platform plugin "windows".
Available platform plugins are: minimal, offscreen
And not the following runtime error.
Since I had to go to external sources to get the Microsoft DLL's, doesn't this really points to something faulty with the Windows 8.1 DLL's?
EDIT3:
To clarify, in my \platforms I have
qminimal.dll
qmoffscreen.dll
qwindows.dll
whilst in my \plugins I copied the same DLL's.
All required steps are described on this page of the documentation. Check especially the "plugandpaint" example under "Creating the application package".
My guess is that you are missing the second one:
myapp.exe
platform/qwindows.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Widgets.dll
And yes, dependency management on Windows is a pain. It should be part of the OS, instead, it's not, and you have to take care of everything yourself.

QBSDK Distribution for VB6 App

Ok, I went through great lengths but I finally got my integration to quickbooks working on my VB6 application. It works perfectly on my build machine. I actually installed the qbdsk11 on my build machine and worte and tested the code. The ONLY new reference in the project is the QBFC11.dll.
So, I added the QBFC11.dll to my innosetup, told it to do a regsvr on the dll, and hoped this was enough.
NOT.
First, during install, I get a failure to register the dll. Apparently, this DLL isnt meant to be registered?
But the .DLL was put in Windows System32, so I tried my program anyways...
NOPE. Doesnt work. I get a runtime 91, about an object variable not set. Which makes sense, if it cant create the object.
So, for grins, I moved a copy of the .DLL into the program folder, next to my executable.
Same thing. Runtime error 91.
So, i then grab the whole qbsdk11 installer and install it on this machine. I figure I can make it an additional download for people who want to use this extra functionality.
But no, even with the whole SDK installed, I still get the same runtime error.
I have not been able to find any CLEAR information on how to proceed. I'd prefer for this to be part of my base install. But apparently something still just isn't right.
What did I miss? How do I fix this? I don't even know what to try next.
If you're using QBFC11, you must install the QBFC11 redistributable components with your application. You can find instructions on how to do this in the QBSDK Programmer's Guide in the section titled Redistributing SDK Components With Your Application, subsection Using Installers and Merge Modules.
The most likely cause of the runtime error you're currently getting is the manipulation of the QBFC11.DLL that you did before you installed the SDK. I would start again with a clean OS image so that you can get the proper procedure down.

Qt Creator "The program has unexpectedly finished."

Yesterday I installed Qt Creator and the Qt Library 5.0.1. When I created a new project and wanted to see how it looks, so I build and run the program and I got the following error:
Starting C:\Users\Khaled\workspace_qt\Test-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug\debug\Test.exe...
The program has unexpectedly finished.
C:\Users\Khaled\workspace_qt\Test-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug\debug\Test.exe exited with code -1073741511
I got the same error when I tried to build and run the address book application from the example section.
I looked for other questions here, and I read one that said to check g++ version and to change toolchain from the Build & Run section in the setting, but there is nothing that says toolchain. I also read one where it said to try to chnage between debug and release mode, both didn't work. I also just read a post about using Event Viewer to see the lacking dlls but I couldn't find anything.
Why am I getting this error message and how can I fix it?
Thanks
If you run your application by clicking on it or using cmd (basically not through Qt), you will get a Windows system error informing you of the problem. If you're missing DLL's (which you seem to be), you'll be told which ones, although it will only tell you one at a time.

OpenCV_HelloWorld project in VC++ 2010 Runtime Error:

I set up the environment according to this tutorial:
http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010
However the picture they want you to use is no longer there, so I just saved the supplied screen shot with the same name as the original file.
Builds fine, Begins to run but then I get a runtime error
Here is the runtime error:
OpenCV_HelloWorld.exe - Application Error : The application was unable to start correctly (0xc0150002). Click OK to close the application.
I looked in Event Viewer and found that it also set off a another error but did not announce
Here is the unannounced error:
Activation context generation failed for "C:\OpenCV2.1\bin\cxcore210d.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.
As you can see it says to use sxstrace.exe however I don't appear to have that program. After a quick Google I read that the program was included in the Microsoft Windows Platform SDK, so I'm downloading the most relevant version (windows 7 version for c# and .net) and installing that to follow up on that, I'll post what I find as it comes.
Any help is very much appreciated
Unexpectedly the project builds and runs now. The only modifications made were removing spaces in the c++ directory and linker options from the tutorial. External changes were the completed installation of the windows platform SDK, however OpenCV has no dependencies with windows platform sdk. I am unsure how it was resolved, but it's no longer a problem.

Resources