hi
i have finish my game and it run very well when i run it inside visual studio
but when i try to run it from exe file it run and when i chose the mission and start it the game is close , i used code block but no useful
what is solution to make my game run from exe with out stop or close?
please tell me what i can do
export game
-
- Posts: 288
- Joined: Wed Apr 16, 2008 1:45 am
- Contact:
is the dll and all of the models and textures and fonts placed in the same directory formation as it was when running in visual studio? If you compile it then copy the exe into the main folder of the project then it should run just fine . I think it is failing to find something and just closes because it can't continue or errors.
You say you tried moving the files, but I thought I'd post this here anyway (just in case)
This code /should/ resolve your working directory to the folder your EXE resides in. (In Windows anyway)
(argv would be the command line arguments your application gets when it is started with main "int main(int argc,char* argv[])")
With that you can just put everything where your EXE is.
~DtD
This code /should/ resolve your working directory to the folder your EXE resides in. (In Windows anyway)
Code: Select all
irr::io::IFileSystem* filesys = irrDevice->getFileSystem();
filesys->changeWorkingDirectoryTo(filesys->getFileDir(argv[0]).c_str());
With that you can just put everything where your EXE is.
~DtD