OpenCV 2.4.8 Visual Studio 2012 - c++

I installed OpenCV 2.4.8 on Visual Studion 2012 (I am a student in CS, so VS is from dreamspark)
I did everything in the installation steps. Then I wrote a simple program to read an image and display it on the screen. When I first compile it, it gives me the error: "The program can't start because opencv_core248d.dll is missing from your computer. Try reinstalling the program to fix this problem.". BUT !!! When I go to the project folder, and run the .sln file, and THEN compile, IT WORKS! There are no missing dlls, the PATH is created, I saved the property sheets so I don't have to repeat the steps each time. So, why doesn't it compile within the IDE, and yet it does run fine in the second window IDE.
How do I solve this problem.

I SOLVED IT !!! Finally! After you write the directory in your PATH, you have to restart the computer, otherwise VS doesn't know where the dlls are. That's why it works when you open the project manually, and not within the IDE

Related

Code Execution cannot proceed because SDL2.dll was not found

I'm using Microsoft Visual Studio 2019 with c++ code. I'm working on a new project and Visual Studio has no issues building the code, however when I actually run the program I get this error.
I have SDL2 installed as I have another program that runs just fine. So I'm not really sure what the issue is here.
you can copy the SDL2.dll to the systemm32 folder and that should solve your problem

Unhandled exception at 0x74E733AB (ucrtbase.dll) in OpenClaw.exe

I wanted to tinker this open source remake of the famous Claw.
Visit https://github.com/pjasicek/OpenClaw
Before I start with how I've cloned this game and tried to build it, I'm new to the open source community. I did the following things.
I cloned the repository.
Opened the project using Visual Studio 2017 Community edition and I changed the Configuration to Release and platform to Win32.
I then built the libwap solution without any errors.
Then I used CMake 3.11.0 to generate the required files for the Box2D solution and then generated it and then the Box2D build was a success.
I built the Midiproc manually and finally, I tried building the entire solution.
It threw a MSVCR120D.dll missing error and I copied all the .dlls from the game's release folder https://github.com/pjasicek/OpenClaw/releases
Now the game runs just fine when I launch it from the File explorer, but when I try to launch it from Visual Studio 2017, it throws the following error.
Check out this image:
How do I run the game from Visual Studio? Have I misconfigured the Visual Studio?
If you need any more details on what I did, please let me know.
[EDIT] I want to configure Visual Studio to be able to run the release and modify the source code so I can tinker it and try to understand how the game works internally.
I cloned the repository again and did a clean compilation of all the solutions. Turns out there was a problem when I copied/overwritten all dlls from the release build. Now, the game builds and executes fine.
Thanks for the help.

How do I alter the full path of visual studio project so I can use it on multiple computers?

So for a class we have a couple of programs where we are using opengl. To make setup easier we started by cloning glitter https://github.com/Polytonic/Glitter. I then compliled it according to the instructions for visual studio 2017 and added my code to the project I am working on. I did this on my desktop computer but saved the files in onedrive. When I open the same project on my laptop and try to build the project I get the error "the source directory D:/OneDrive/fall_2017/Glitter does not appear to contain CMakeLists.txt" and several other similar errors. On my laptop the directory to the files is C:/Users/Me/OneDrive/fall_2017/Glitter. The visual studio program lists the full path as D:/OneDrive/fall_2017/Glitter which is the path of the folder on my desktop.
Is there a way for me to change the filepath or is the issue with my cmake file? Do I have to rebuild it for every computer I use it on? I don't know a whole lot about visual studio so I don't know what I need to change to get this to work.
Turns out I have to rebuild on every computer. Thanks to those who left comments.

Visual Studio freeglut/glew error ("missing from computer")

Long story short:
I'm at home trying to run a project I've been tinkering with in school (OpenGL).
When trying to run the unchanged program, I get errors saying freeglut.dll is missing.
The thing is:
I have freeglut and glew on my computer
I am running the same version of Visual Studio (2013)
The path to the libraries and such is exactly the same due to the glew and freeglut-files being located in a Dropbox-folder on both PCs.
The .dlls are also located in the same folders as the .exe
I have tried rebuilding, cleaning, starting a new project with the same files, moving the freeglut and glew-files to different folders, but for some reason it doesn't seem to work.
Have you tried rebooting your system?
SOLVED: Turns out I had Visual Studio Ultimate on the non-working PC and not Visual Studio Professional. Installing Professional did the trick.

Visual Studio - Can't run program: the .exe can't be found

I am working on a program and so far, it was working perfectly well but now I have a problem: when I build my project, it works, it generates the .exe but I can't run it, I get this error:
Unable to start program 'H:\C++\Shooter\Debug\Shooter.exe'. Specified file could not be found
(it's a translation)
When I look in the Debug folder, the exe is here and when I try to execute it manually, it throws the same error and deletes the .exe. Note that everything works on my second computer which has the same version of Visual Studio.
Also, this project shares the same solution than an other one (the server) but the server works fine.
I already tried repairing Visual Studio but it didn't solve my problem.
Thanks.
It was my antivirus that was causing the problem so I put the directory to my anti-virus safe zone.