Archived

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

windows agony :-)

This topic is 5586 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 am new to windows programming (have mostly worked with unix before) and i have a silly problem.. I am trying to learn directX (and also Visual Studio 6) and my problem is probably some stupid switch in Visual C++ or something. My little program (an animatated sprite on a scrolling starfield... pure 2d) works great inside VS6, but when i try running the .exe by itself (outside VS) a window just appears on screen for like half a second and then nothing more.. I''ve never had this problem with my old DOS programs, and i feel a bit ridiculous for asking, but nothing seems to help. Does anyone know what i am doing wrong? I''m sure it is something silly :-) -Daniel (on WinXP pro)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
When you execute a program from with in visual C++ it''s run time path usually defaults to one level up for example:

You''ve got a project in c:\test\
You create a debug version of the project and execute it, the exe is stored in c:\test\debug\.
But visual C++ takes you one level up by default so it searches for files in c:\test\ rather than c:\test\debug\ where the executable actually lives.

Now if you were to execute the program in it''s native directory from out side of visual C++ it will look in c:\test\debug\ for all the files it needs such as .bmp files, .wav files and so on.

So basically your problem is that you need to place all the files nessassary to run your .exe file in the same directory as the executeable, when running your application outside of visual C++.

Share this post


Link to post
Share on other sites