SDL2.DLL missing - c++

I'm following this tutorial to setup the SDL template but when I try and run the program I get the following error.
I have gone over the tutorial several times but cannot see what mistake I am making.
I copied the SDL2.DLL into the Release Directory and then ran it and I got a different error.
but I imagine that I shouldn't have to do this?
Anyone see what mistake I could be making?
I am using windows 8 + MS Visual Studio 2012

There are two different versions of SDL2.DLL, one is x86 and another is x64. A common mistake is to use the x64 one when in fact you are compiling your code as x86. Try both of them to make sure you aren't making that mistake.

Related

Why is OpenDDS failing to compile?

My friend is trying to compile OpenDDS from here:
OpenDDS Insall Directions
I have no code.. but i need this to make pastebin work?
She has followed that link to a T. And it produces these errors:
Errors
Here is the full output from Visual Studio:
Output
The interesting part:
I can compile it just fine using the instructions from that link in the top. I have done more coding than she, so something is installed that is allowing it to compile without issue, she has a clean install of Visual Studio Community, I have Visual Studio Enterprise (Both 2019) - I do not think the versions should matter, but shared for better understanding.
From what I can gather from the errors, there is a problem locating files on her machine, and not mine. Why it can't find files? I have no idea... I am really confused with why it works for me not her.
I even went and made a VirtualBox Machine with windows 10 on it, and I get the same errors there.
Any and all help is super appreciated, thank you!
This was fixed in this PR: https://github.com/objectcomputing/OpenDDS/pull/1701, but that hasn't made it into a release yet. I can't comment in the comment chain above, but dxiv is correct that this is caused by an include dependency that broke in VS2019. It's only in the dds/DCPS/Serializer.h header though, so just having your friend change that file to how it is in the PR should allow it to build.

SDL2 possible linking issue in VS2017

I'm using Visual Studio 2017 with OpenGLESApp template and I'm trying to put SDL2 into my project. I linked it by clicking Android.NativeActivity properties and in there I selected include folder and in linking part I linked against pre-compiled x86 binary which I downloaded from official SDL2 webpage.
Now since I'm using emulator with x86 base image I'm assuming that those things are compatible. Is my assumption wrong?
When I try to use SDL2 functions in my code compiler is complaining with the following error message:
Error MSB6006 "clang.exe" exited with code 1.
And when I delete all usages of SDL2 functions code compiles just fine. Now this would perhaps indicate that architectures are not compatible and that my initial assumption is wrong.
Can somebody help me to understand this? Is there any way I can see more information from the compiler to validate what the actual issue is?
Also, any help on how to get SDL2 to run in my project would be helpful.
You probably have undefined references in your output before the error you are showing.
You are trying to link windows libraries with Android binaries, which cannot work, they are not the proper type. Even if they both can be executed on a x86 machine, they have a different structure.

Visual C Run-time libraries missing

I've been losing sleep over this for a few days now:
I'm using SFML to create an application and everything was well until I created a new project a few days ago. After that whenever I tried to compile a solution that uses SFML libraries I would get linker errors and missing DLL files.
I looked around and found a program called dependency walker which looks at which DLL files a program depends on. Apparently my program executable was missing some DLL files that are meant to be inside the windows directory.
I freaked out just a little, before finding out they all had the prefix "CRT" and the suffix of either nothing or "D" which meant that they were Visual C run-time library DLL's.
Even though I'm not missing vital DLL's from my PC, I still need to fix this issue. No there was not major hardware/software changes to my PC prior to the problem (I don't have an antivirus and just trust my guts, I haven't had an issue for 5 years now) and yes I'm sure I'm setting up the SFML directories properly following a tutorial.
I've tried reinstalling and repairing VS and the redistributable VC's for my version of VS (which is 2012 express for win desktop), tried clean booting, the windows self file check (sfc /scannow) and also tried manually placing DLL's into my directory that the dependency walker said I was missing.
Has anyone else encountered this before? How did you solve it?
*Interesting note: I have access to an admin account on my school network and installed VS on a computer there to see if the problem would re-occur. Since the windows directories on those machines are never modified VS executed fine. Could it be that I need to get a clean installation of windows?
I'm not sure if OP is allowed to answer on his own thread (or if there is a time limit), but here goes:
I solved my issue after looking at it with a cool head. I re-checked the version of my SFML libraries and wasn't sure if they were 64 or 32 bit, so I re-downloaded the 32-bit version (because my debug compiler is set to run on 32-bit) that was compatible with my version of VS. This changed the error I got from missing MSVCP140D.dll to MSVCO120D.dll (the numbers correspond according to the architecture).
I Googled/asked around for a while more to figure out that I needed a file named MSVCR120D.dll, which was found in system32 but not in SysWoW64. After placing respective architecture DLL files (64 bit for system32, 32 bit for SysWow64) it finally worked!
Even though dependency walker still says the executable is missing 6-7 other DLL files, the project still compiles and runs fine.
I hope this wasn't a solution that only applied to me, I've seen many others with the same problem.

Qt5Cored.dll missing when trying to run application

I'm using Visual Studio 2013 Ultimate.
My Qt version is 5.2.1
Am using a specific build for VS2013 which I obtained from here.
Now, what I did:
Created a new Qt Application from Visual Studio.
Typed in my logic and the code.
Built it successfully in x64 Debug mode.
Ran the application successfully.
Everything good so far.
Now the problem:
I restart my Visual Studio and load the project.
It is built successfully (in x64 Debug).
Now, am unable to run it. I get the error:
The program can't start because Qt5Cored.dll is missing from your computer.
Try reinstalling the program to fix this problem.
It ran the first time when I created the application. Now it won't run.
I tried simulating the problem, and this happens everytime. Runs the first time, and doesn't run after Visual Studio restart.
Please help me resolve this issue.
Thanks in advance.
From project properties you have to go to debugging -> Environment -> and write PATH=qt5 dll paths Or you have to put the dlls next to the exe.
The first time you in debug mode. Probably in that case Qt5Cored.dll (with a d in the name) was used. Maybe in the second build, you build in release mode, and for some reason Qt5Core.dll is not found in the PATH.
here is what i did and it worked :D
first : make sure you are building a release version not a debug version
second : it asked for the qt5core.dll when you copy it to the same path of your program it may ask for other *.dll files so i put the program in the folder containing all the dlls :D
which is
C:\Qt\Qt5.7.0\5.7\mingw53_32\bin
or according to your installation ..it worked well
any way this folder (as i think) contains all DLL libraries you may need with your program
so to know what exactly you need from it try to start your program many times in another location and in every time you will know another dll needed according to your programming ..
that method worked but i think there may be a more cleaver solutions we have to dig for :)

Why won't Allegro initialize?

I tried installing allegro 5 to code blocks, but even though it seems the program compiles it won't initialize. I get an error saying the application failed to start because allegro-5.0.9-monolith-md-debug.dll was not found. It also says re-installing may help, but I've tried that several times already. I tried following online tutorials, but I still get this error. Am I doing something wrong? Please help.
Copy allegro-5.0.9-monolith-md-debug.dll into the same directory as your source code. I had this same exact problem. I was using Visual C++ 2010 express edition, paste it with the source not the .exe if you are running it from within the compiler, if you want to run it outside of the compiler it will need to in the same location as the .exe