Why won't Allegro initialize? - c++

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

Related

Vscode doesnt show errors on the IDE like other IDEs such as (visual studio 2019, repl.it, etc.)

so I recently got started with vscode and working with the c++ project when I noticed that some of the errors aren't displaying. Also, the program would run fine on vscode but when used it on repl.it it would show some critical errors like "signal: Aborted (core dumped)" and it would tell me at which line it encountered that problem.
Looking at vscode however it seems to me it doesn't detect subtle errors such as when I have a function that would return a string and I purposely return 0 instead of a string it still considers it a valid operation. I don't know if the issue is the IntelliSense or some error-checking aspects, but one thing for certain I know visual studio would show this with a warning sign that would appear on the number line.
I do have the squiggly lines enabled for errors and it does show errors if I have some keyword typed incorrectly. What I want to know is where the c++ would fail to run and tell me before the run, or even during runtime.
screenshot of no error when there should be
VSCode is pretty intelligent, and in theory it should be able to have all the IntelliSense that those other IDEs have. However, that does not come out of the box. What you need to do it install some extensions specific to the programming / scripting languages that you work with. For example, for C++ you can download C/C++ extension developed by Microsoft.
After installing the needed extensions please read some documentation and tweak them as needed.
Your IntelliSense issues will be solved.
I've figured out that it wasn't displaying the crash errors because my installation of msvc was flawed. I downloaded msvc again and used the Pacman commands to install all the necessary files and now my crash errors show. However, some syntax errors still don't show like int main {... without a closing curly brace. This code still runs, and the error is picked up during the run time. I would've expected the error to be highlighted before the run.

Missing libmx.dll file in a MATLAB to visualstudio C environment

I am currently interfacing matlab with visual studio to use in C++. However, I keep getting the errror libmx.dll not found. Navigating to the instructed PATH, I cannot find the libmx.dll fine anywhere. The error tells me that reinstalling the program can help, so I reinstalled matlab and simulink. I still get the same error. I assume that the file was removed because my antivirus thought it was malicious, so how can I obtain another copy of this libmx.dll file?

Eclipse with CDT not compiling at all

I have been trying out using Eclipse CDT for a course I am taking. Previously I have been using Visual Studio Express but since that requires me to be online and I have to use the IDE+compiler offline, I switched to Eclipse + Cygwin GCC.
Now everything was working prefectly, until I got an error about file paths in my make file. After reading some of the posts online, the issue seemed to be that Cygwin's make does not resolve absolute Windows file paths because of the ':' symbol and confuses it with a new target definition. The proposed fix was to download a fixed make file. I diligently did so and the programs would compile fine.
But after I went into the first debug session, everything froze. I aborted eclipse and tried a clean build but now the compilation wont happen AT ALL, which is very weird for me.
I can't find a post for a similar problem so I am really stuck now. I was currently working the assumption that my CDT may be corrupt or something so I downloaded Eclipse Luna just today and tried building using that, but no joy. Even a fresh project in a new workspace wont compile.
Appreciate the help in advance.
Did you try redownloading Eclipse? Sometimes Eclipse gets a fatal error glitch that makes it unable to compile anything. I've had this problem before, the only way i was able to fix it was to uninstall and re download the latest version. If this doesnt work, try switching to Bloodshed Dev C++ or codeblocks.
So it seems like an issue with the new make (v3.80). upgating it to v4.08 fixed the issue of not building.
Version 4.08 however does not fix the Windows file paths not being recognized properly and treated as a target definition. I am still getting the multiple target patterns. stop error.
EDIT: Found this on Stack overflow to solve the issue... should have searched better previously.
Very simple application fails with "multiple target patterns" from Eclipse

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

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!

Tried to embed python in a visual studio 2010 c++ file, exits with code 1

I am trying to embed some python code in a c++ application i am developing with ms visual studio c++ 2010. But when i run the program, it exits with code 0x01 when i call Py_initialize().
I dont know how to find out what went wrong. the help file says, Py_Initialize can't return an error value, it only fails fataly.
But, why did it fail?
I am using a self-compiled python27_d.dll, which i created with the msvs project files in the source downloads from python.org.
Is there simple 'hello world' type example of the Py_Initilize code in the python sdk you can start with?
That will at least tell you if you have the compiler environment setup correctly, or if the error is in your usage.
Well, i finally found out what went wrong.
I did compile my python27_d.dll with the same VC10 as my program itself.
But my program is normally compiled as 64 bit executable. I just forgot to compile the dll for x64, too. I didnt think this would lead to such annoying behavoiur, as i believed i would get a linkr error then.