Advertisement

Will run under compiler but not outside

Started by April 06, 2003 02:20 PM
3 comments, last by Xiachunyi 21 years, 10 months ago
Hello, I "was" finally done with my OpenGL project and everything ran smoothly under the compiler''s run command when I decided to execute the file outside of my compiler. I executed the file and encountered an error. "Project1.exe has caused a fatal error in project1", something like that. Why does it run under my compiler, but not outside of it.? I have DevC++, and I think it''s a problem with the textures. Thanks in advance.
Is everything in correct directories?
Advertisement
Thanks for the quick reply, yes, everything is in the same directory.

I tried debugging it like this:

  	    if(TextureImage[0]=LoadBMP("cube1.bmp"))//First cube	    {	         Status=TRUE;	    }	      if(Status == FALSE)	      {             MessageBox(NULL,"Texture 0","Texture Loading Error",MB_OK);	    	      }	    Status=FALSE;	    if(TextureImage[1]=LoadBMP("cube2.bmp"))//Second cube	    {	         Status=TRUE;	    }	      if(Status == FALSE)	      {             MessageBox(NULL,"Texture 1","Texture Loading Error",MB_OK);	    	      }	    	    Status=FALSE;	    	    if(TextureImage[2]=LoadBMP("NEHE.bmp")) //Third cube        {             Status=TRUE;        }	      if(Status == FALSE)	      {             MessageBox(NULL,"Texture 2","Texture Loading Error",MB_OK);	    	      }        	    Status=FALSE;        	    	    if(TextureImage[3]=LoadBMP("cube4.bmp"))//Fourth cube	    {	         Status=TRUE;	    }	      if(Status == FALSE)	      {             MessageBox(NULL,"Texture 3","Texture Loading Error",MB_OK);	    	      }	      

There is more before and behind the code but that is basically my debugging statement, yea need to make a function.

Anyway... None of the dialog boxes show up when I run the program under my compiler, but they do show up when I run the program outside the compiler. In fact, every one of the boxes show up. I'm going to try designating the bitmaps, and moving them, to another directory and see if that will do anything. Thanks for answering!

[edited by - Xiachunyi on April 6, 2003 3:45:18 PM]
Okay, I fixed it.

It seems that if I activate the "view in thumbview mode" in the current directory my bitmaps are in, the program won''t run. If I disable the thumbview mode and just display icons... it will work. Hmmm... I hate these outside errors.
did you move your .exe from the debug folder

This topic is closed to new replies.

Advertisement