Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Application Failed to Initialize...

This topic is 5283 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just completed a game that I''ve been working on. It was made using MSVC++. It runs fine on both of my computers that have MSVC++ installed on them. When I try to run it on a third box without MSVC++ installed, I get the following error (where the ##''s are some memory location): "Application failed to initialize properly (#########). Click OK to terminate the application" I used depends.exe to see all the required DLL''s... so I copied them into the folder with the .exe, and I still have the same error. The program is written in OpenGL. The two computers it works on have a GeForce3 and a ATI Raedon 9700. The computer it does not work on has a GeForce 4. o_O Obviously it is not a DLL problem, or it would say so. The only other thing I can possibly think of is a library issue? but this makes no sense to me as I thought .exe was the complete binary code with the libraries contained in them. Here are the includes, in case it will help diagnose the problem. If you need all the code, I can post a link.
#include <windows.h>											// Header File For Windows

#include <stdio.h>												// Header File For Standard Input / Output

#include <stdarg.h>												// Header File For Variable Argument Routines

#include <math.h>												// Header File For Math Operations

#include <gl\gl.h>												// Header File For The OpenGL32 Library

#include <gl\glu.h>												// Header File For The GLu32 Library

#include <gl\glaux.h>											// Header File For The GLaux Library

#include <fstream>												// allow file I/O

#include <string>

#pragma comment( lib, "opengl32.lib" )							// Search For OpenGL32.lib While Linking

#pragma comment( lib, "glu32.lib" )								// Search For GLu32.lib While Linking

#pragma comment( lib, "glut32.lib" )							// Search for GLUT32.lib While Linking

#pragma comment( lib, "winmm.lib" )								// Search For WinMM Library While Linking

#pragma comment( lib, "glaux.lib" )								// define the GL Aux library

Share this post

Link to post
Share on other sites
You can try, on every function in your Win main, include a dialog box to display a noted section, that way you can probably find the exact function that it is crashing on.

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
HWND hWin=GetActiveWindow();
MessageBox(hWin, "Starting", "Test", MB_OK);
MessageBox(hWin, "Before func1", "Test", MB_OK);
MessageBox(hWin, "Before func2", "Test", MB_OK);

This should tell you what function or code portion that is failing.

After completing this if you can not find why a particular function is failing, if it is Win API, then call this after that function.

char buffer[256];

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!