int main(int argc, char *argv[])
{
printf("\nMooo\n");
/*if(!SDL_OGL_Init("Blockktris", 800, 600, 32, 0))
return 0;
SDL_OGL_Init_GUI("data/themes/default");
if(!LoadMenu())
SDL_OGL_Exit();
SDL_OGL_Draw = DrawMainMenu;
SDL_OGL_CleanUp = UnloadAll;
SDL_OGL_Loop();*/
return 0;
}
What could possibly be going on?!?
Program not even making it to first line
My program isn't even making it to the first line of code...
How to ask questions the smart way.
Does it compile? If not, what are the errors. Does it run? What output are you seeing? What output do you expect?
Does it compile? If not, what are the errors. Does it run? What output are you seeing? What output do you expect?
What could possibly be the error messages? [smile]
If the program just shutsdown - rather never makes it to start up - it's likely that it's having troubles locating a dll. Check the exe using DependencyWalker or a similar tool.
If the program just shutsdown - rather never makes it to start up - it's likely that it's having troubles locating a dll. Check the exe using DependencyWalker or a similar tool.
Additional possibilities: You could have a global variable of a class type with a constructor that's throwing an exception. Your main() could be running but the output is being redirected to a file so you never see it.
I'm assuming you are testing this program by running it and you are not seeing the "Mooo" output.
First off, there are these things called debuggers. It's very likely your compiler comes with one. Read the docs to find out how to use it. Give it a try and see if you put a breakpoint on the printf if it ever gets hit. If your problem is a crash initializing a global or a failure to load some dependent library the debugger will likely tell you.
Other possibilities not mentioned -
printf likes to buffer it's output. It may or may not flush when it sees a \n. Try putting an explicit fflush(stdout) after the printf.
It may be that you are running this in an environment that does not support printf by default. Windows GUI programs (as opposed to console programs) are an example.
First off, there are these things called debuggers. It's very likely your compiler comes with one. Read the docs to find out how to use it. Give it a try and see if you put a breakpoint on the printf if it ever gets hit. If your problem is a crash initializing a global or a failure to load some dependent library the debugger will likely tell you.
Other possibilities not mentioned -
printf likes to buffer it's output. It may or may not flush when it sees a \n. Try putting an explicit fflush(stdout) after the printf.
It may be that you are running this in an environment that does not support printf by default. Windows GUI programs (as opposed to console programs) are an example.
In addition to all the above (very valid) advice: I think SDL redirects stdout and other streams to stdout.txt (et cetera). Did you try looking there?
Sorry if my initial message was so vague, I had to leave really fast. It does compile. I tried setting a breakpoint and using GDB but it doesn't get to that either. I looked in the STDOUT.txt and there is nothing. I think I'll try the DependencyWalker idea. Or maybe look for global variables that could be throwing an exception. The program has become rather large around 3000 lines and has been working for... well since I started programming it. It's a tetris game, and before this happeend to decided to turn my little SDL OpenGL wrapper into a lib to make things easier project wise, but then decided to change it back to the way I had it, with all the SDL OpenGL wrapper source included in my project. After readding my source, the program starts, and exits very fast, not making it to my printf("Moo"); line that I put to see if it even got that far. To make a long story short, the code work in as a lib (.a) but not directly in the source code. Thanks.
Well after using the DependencyWalker I get that two DLL's are not there.
EFSADU.DLL and MSJAVA.DLL
I'm quite confused to why MSJAVA.DLL is in there, if (as the name implies) it has anything to do with Java. I'm using C++. Could it be something my IDE is doing. (CodeBlocks Beta by the way). Thanks.
EFSADU.DLL and MSJAVA.DLL
I'm quite confused to why MSJAVA.DLL is in there, if (as the name implies) it has anything to do with Java. I'm using C++. Could it be something my IDE is doing. (CodeBlocks Beta by the way). Thanks.
I have also seen that MSJAVA.dll in many of my programs as being a missing component - I would focus more on the first one you mentioned. Is EFSADU.DLL a part of SDL? If so make sure the dll is in the same directory as your executable.
efsadu - efsadu.dll - DLL Information
DLL File: efsadu or efsadu.dll
DLL Name: File Encryption Utility
I guess it could be... but I've never had to use it before. And I haven't changed my code, at all. I've put them both in the directory... and I get "Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module." as an error from the Dependecy Walker.
I tired making an exe without my Tetris game even in it, just my wrapper and that isn't working anymore either. :/
[Edited by - DarkNebula on July 10, 2006 4:36:32 PM]
DLL File: efsadu or efsadu.dll
DLL Name: File Encryption Utility
I guess it could be... but I've never had to use it before. And I haven't changed my code, at all. I've put them both in the directory... and I get "Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module." as an error from the Dependecy Walker.
I tired making an exe without my Tetris game even in it, just my wrapper and that isn't working anymore either. :/
[Edited by - DarkNebula on July 10, 2006 4:36:32 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement