interesting devc++ bug

Started by
3 comments, last by MaulingMonkey 19 years, 5 months ago
hey just wondering if anyone has experienced this in devc++. just yesterday i migrated from MinGWStudio to Dev-C++ 5.0 beta 9 and encountered the strangest thing. my project is opengl based and after setting up the linking options it rebuilt fine from the ide (well it should its using the same compiler) anyways when i run the program from the ide the program does not function properly and gfx are not displayed in the correct place and text strings have strange numbers appended to them. however if i execute the same build from windows explorer the program functions exactly as intended. im positive its not an old version im running from explorer and a newer build from the ide, its the same executable. has anyone experienced this? why would something like this happen?
Advertisement
Maybe it's because Dev-Cpp manages the makefile for you. It may add some compile parameters your project doesn't like. Check the project settings and the makefile.win file.

Oxyd
Dev-C++ is full of bugs...(but since it's free and pretty good in all other ways I still use it)
Killers don't end up in jailThey end up on a high-score!
I rarely use DevC++ so I’m basing this on my experience with MSVC++:
You mentioned that the graphics do not display correctly/at all. When running the program from the IDE (in VC++ at least) the program starts in the directory of the project file. However, when running manually from explorer the program starts in the directory the exe exists in. Could it be that your external files are in a directory relative to the built exe rather than the project file (.dsw in VC++)?

I address this issue by insterting this segment of code at application initialization to set the ‘current directory’ to the directory that the exe exists in:
//The application directorychar strAppDir[ MAX_PATH ];char * pStr;GetModuleFileName( AppHINSTANCE, strAppDir, MAX_PATH ); pStr = strrchr( strAppDir, '\\' ); if ( pStr != NULL ) *( ++pStr ) = '\0';SetCurrentDirectory( strAppDir );


Hope this helps,
Jackson Allan
I use Eclipse, a java based IDE with C/C++ Development Tools (CDT). I love it.

This topic is closed to new replies.

Advertisement