Sign in to follow this  

Allegro not working properly

Recommended Posts

Hi, So this is the situation: I open a new project, link the allegro library under Project Options, and copy and paste a source file involving allegro.h from internet. I complie and run it, and everything works fine. However, if I press complie again (whether or not I make any adjustments), it does not complie and gives me the following errors in the message table (in Dev-C++), where the number (as in File 1) represents the row: Line 1: cannot open output file Game Project.exe [Game is the source code file for the project.] File 1: G:\Dev-Cpp\mingw32\bin\ld.exe Message 1: Invalid argument Line 2: [blank] File 2: C:\My Documents\Programming\Useful Programs\GameProject\ Message 2: [Build Error] ["Game] Error 1 I would greatly appreciate your help. I would also like to mention (in case it may be relevant) that when I installed allegro, I followed the instructions in the file mingw32.txt. Everything seemed fine; but, when I finished, I noticed that I now had two Dev-Cpp folders in my G:\ drive. One was the original (which also included the downloaded allegro folder), and the other contained the new allegro library and include files resulted from the build. I restarted the computer, and the two folders (with the exact same name in the same location) still did not merge into one. So, I just did it manually (whether I should have or not), by copying and pasting the new files to their appropriate locations in the original folder and deleting the other folder. I suspect that this occured because I was browsing through My Computer while allegro was building its library in the cmd console.

Share this post

Link to post
Share on other sites
In fact, it seems that compiling the source code has nothing to do with the problem. I can compile it continuously with no error messages; the problem stems from running it and then compiling.
For example, I can compile a source code and run it (as long as there is nothing wrong with the code). And, I can run it continously, as long as I do not compile the code again.
After I close the program, and press compile again (with or without any changes to the code), I receive the above mentioned error messages (from the message board in Dev-C++). Even if I erase the entire code, and compile the blank page, I get the same error messages. From there, I can do one of the following: (1) restart the computer, which allows me to compile and run the same project again (but with the same problem applicable of course); or (2) open a new project (but with the same problem applicable).

[I found that if I open a new project, and compile it a second time after running it (without any changes to the code), there are no error messages, but I cannot run it (nothing happens at the Dev-C++ interface). If I try to run it by opening the corresponding .exe file, a window pops out saying "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."]

Share this post

Link to post
Share on other sites
I decided to uninstall Dev-C++ (and delete the Dev-Cpp folder which also contains the allegro folder). I undid the changes to Environmental Variables previously required to build the allegro library. I ran CCleaner in attempt to clean up my system and to tidy up my registry. I also ran Registry Mechanic afterwards for any additional registry cleaning. I then assumed that I did everything there is to do in order to bring my system back to the state it was in before I installed Dec-C++ and allegro. I then restarted the computer.

I reinstalled the full Dev-C++ (I did not do anything for allegro yet). I then simply tested out the IDE to check if everything was okay with it. It turns out that there is a problem right over here with Dev-C++ (regardless of allegro afterall). Everything seems to work fine for code in single source files (as far as I can tell). It is when I try to make a project that problems begin. Basically, the project compiles but does not run properly.

Here is a breakdown of what I do:
I open a new project; I choose Windows Application; I close the main.cpp that comes by default (as instructed in other tutorial websites); I add a new souce file to the project and write a simple code using iostream; I compile it; I run it, and this is what I noticed:
(1) If I have system("Pause") anywhere in the code (usually near the end), it is all it gives me (i.e. the output is "Please press a key to continue", even though it should cout some other stuff before it). If I copy and paste the code to a single source file, then it runs properly.
(2) For other codes, the program did not even show up. I had to use Windows Task Manager to close it (where the corresponding .exe file appeared under Processes).

So I say the problem deduces to one of the following:
(1) There is something wrong with my system.
(2) There is something in my system that is interfering with the processes of Dev-C++.
(3) There is something wrong with the CD I am using to install Dev-C++.
(4) I am simply not using Dev-C++ correctly (somehow) when it comes to making projects.

Here is something that might be relevant:
I recall using RegistrySmart 4.2 not too long ago before uninstalling it due to apparent problems it was causing. These problems included the disappearance of the Windows Quick Launch, and also (more relevant) this: If I ran RegistrySmart for a second time, the program did not appear, only the usual bar at the bottom (that could not display the window).

Hence, I am afraid there might be something wrong with my system. I need help with this. I did everything I could think of. I need to know what I should do next in order to check if there is anything that could be causing malfunction in my system (e.g. a necessary file or something that I might have deleted).

Share this post

Link to post
Share on other sites
It's definately something wrong with my system.
I installed Dev-C++ and allegro on another computer and everything worked perfectly.
I could use a bit of help as to how to pinpoint my system problem.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this