Archived

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

Numsgil

Running a program in MSVC 6.0 IDE

Recommended Posts

I''m porting an old project from windows to DOS, and I encounter the following abnormality: when I compile and run the program from within the IDE, it gives me one of those XP error windows. when I run it outside the IDE, it runs normally. This error is linked somehow to the fread function. The obvious solution is to change fread to something else, but that would require far too much rewriting for my taste, and besides, it runs outside the IDE, so it obviously _can_ work. Is anyone aware of some switch or something inside MSVC 6.0''s IDE that would cause a program not to run correctly when accessed from within? Thanks.

Share this post


Link to post
Share on other sites
Well, my first thought would be your working directory under project settings, debug tab.

Make sure that it is pointed to the directory that your debug exe is in. Or else it won''t find any local files that are in the same directory.

Share this post


Link to post
Share on other sites
What precisely is the error you are getting? By default, VC6 uses the project directory as the *working* directory. Two subdirectories are used to store the builds (named Release and Debug for the respective build types). If your resource files are in either the Release or Debug directories with the executable, they will not be found. They should be in the top level project directory instead - but in this case the app will not find the resources when you run it outside of VS.

What I like to do is configure the project to output the compiled exe file to the top-level project directory. I add a d suffix to the name of the exe for the debug build so that it and the release build do not overwrite each other. It''s also possible to change the project working directory instead if you prefer.

All assuming that''s your problem, of course.

Share this post


Link to post
Share on other sites