Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » The application was unable to start correctly (0xc000007b) error.

This thread is locked; no one can reply to it. rss feed Print
The application was unable to start correctly (0xc000007b) error.
divyanthj
Member #13,391
August 2011

I built this little physics simulator on Windows 7 ultimate using Dev CPP 4.9.9.2 and Allegro 4.2.3.

It worked fine.

But after I reinstalled my windows 7 ultimate (full-format), I am unable to run the application I created.

I even tried reusing the source code. Dev Cpp successfully rebuilt the application...compiled it correctly. But when I click "compile and run", it gives me the error message

"The application was unable to start correctly (0xc000007b). Click ok to continue"

What file/installation am I missing here?

PS: Downloaded the allegro mol pack put in the attachment

OnlineCop
Member #7,919
October 2006
avatar

Did you set up your environment variables correctly?

Where is Allegro installed in? You should have a DLL somewhere, such as "alleg42.dll" (the name may be different) that would be either in your Windows path, or in the current folder of the application you're trying to run.

1) Where is that DLL located on your computer
2) What is your Environment currently (specifically, the PATH)?
3) Did you dynamically or statically link the allegro library when you compiled it?

divyanthj
Member #13,391
August 2011

I have no idea how to set up environment variables. All I did was write the code and click "compile and run". The program worked perfectly in the previous installation of Windows 7. I then backed up the entire folder containing the main.cpp, some object files and the .exe onto a pen-drive.

After reinstalling windows 7, installing Dev C++ and installing Allegro 4.2.1 devpak (although I think, I used allegro 4.2.3 to build the application), I copied the project folder back into the Dev C++ folder again, and compiled the code.

The compilation went fine.

But when I "run", I get the error message.

1) alleg42.dll is located in C:\Windows\System32
2) I didn't understand what "environment" is. The path? c:\dev-cpp\playballui\
3) I don't know whether it is dynamically linked or statically linked. I just clicked "Execute" from the drop-down menu on Dev C++ and clicked "Compile". Then "Compile and Run". Everything was in its defaults...not settings changed.

raynebc
Member #11,908
May 2010

Your OS may be infected by a virus or otherwise could be damaged. First thing is to perform a full virus scan, and if that finds nothing, run the following from a command line:

sfc /scannow

Neil Walker
Member #210
April 2000
avatar

If you are compiling C, you should really have a basic understanding of how the compiler/linker goes about it's business and the different ways you can create an executable.

Your 'environment' requires the path to know where to find the compiler/linker and usually environment variables LIB and INCLUDE to know where to find .a/.lib and .h files.

The basics of linking is setting whether you want static or dynamic linking (include everything in the exe or use the allegro dll). The easiest is to select 'multi-threaded dll' and 'multi-threaded debug dll'.

Given the flakiness of DevCPP, download yourself the full copy (i.e. include mingw in the download) of something like code:blocks or visual studio express, then follow the instructions on the allegro wiki.

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

OnlineCop
Member #7,919
October 2006
avatar

divyanthj: You'll want to open your System Properties. This site has a bunch of pictures and step-by-step instructions.

Once you see the environment variables, there are two sections:

  1. User variables

  2. System variables

User variables only affect YOU, and no one else who logs into the computer.
System variables will affect everyone equally: You change the values here, and everyone will have the same settings when they log in.

I don't care which one you choose (based on your own needs: at work, I only modify User; at home -- since I only have one Windows account -- I modify System). You're looking for the PATH variable.

It's not set (by default) under User variables, so you have to click "New...", type PATH as the Variable Name, and add %WINDIR%\System32 as the Variable value.

Or, find PATH under System variables, click EDIT, and make sure that you see something with the \System32 path in there (usually %WINDIR%, but that variable name may be different on different Windows versions...). If it's not in there already, add it.

Log out and back into your account (or restart the computer) for best results, but at this point, you should be able to try to run your program again.

Failing all of this, try copying (not moving) the alleg42.dll from the C:\Windows\System32 directory into your c:\dev-cpp\playballui\ one, and run again. If it works that way, well, your computer just doesn't want to access alleg42.dll from within your C:\Windows\System32 directory... :-/

Go to: