creating exe file in c++ graphics programming

i had recently created an calculator using graphics programmming in dosbox emulated c++...although the program is running extremely fine by clicking on the run button at the task bar ...however in order to submit my project i had to submit the program in .exe file with all doccumentations enclosed in a disc..but here the problem arises i had located the .exe file in the folder however upon opening it it is displaying "failed to initialise bgi graphisc.." or something like that .... im in a great fix as my submission date is nearing please anyone help me ... i would like to know how to resolve this problem.....please anyone help me out!! thanks in advance
Last edited on
upon opening it it is displaying "failed to initialise bgi graphisc.."
Original Borland BGI library does not work for later versions of Windows. You need to run it under DOS.

You can use modern Windows port: http://winbgim.codecutter.org/
(However you will need MinGW based compiler to use it as compatibility with other compilers is not guaranteed. Especially ones running under DOS)
so there's actuaaly no way to open it in .exe created by dos box?? also will u please enlighten me as to why do original borland bgi library doesnt work for later version for windows??
now the code that i had written for my program in c++ can copying and pasting the same code in the MinGW based compiler work same??
Compatibility mode goes back to Windows 95 which ran on top of DOS, I'm not saying for certain that it will work but it's simple enough to try. Otherwise check the licensing on portable versions of DOSBox, if you are allowed to distribute it with your app then you could package them together and kick them off with a batch or autorun file.

If this is for a class or competition, then be aware that you are going to get dinged hard for using BGI. You also probably put twice as much work into getting this working then would have been required with a more modern library as well. I hope you treat this as a learning experience. If you want to score some points back, then force the compatibility mode with a manifest file: http://blogs.msdn.com/b/cjacks/archive/2009/03/27/manifesting-for-compatibility-on-windows-7.aspx
things are getting trickier and more complex yes i would love to know stuffs but i m currently more focused on the creation of the exe file of my code which i had written its too long as a result writting it again within limited time is out of question..i am rather more interested on how to build the .exe file of my c++ graphics code written in emulated version of dosbox
OP wrote:
i am rather more interested on how to build the .exe file of my c++ graphics code written in emulated version of dosbox

Huh? I thought you already built it. And DOSBox is an emulator, so I don't even know what that second part of your sentence is asking.

Look, you're getting yourself worked up because of your deadline and you're making it seem more difficult than it is. This is a common problem, we've all been there. Just take it one step at a time.

1.) Take your executable and copy it to a CD.

2.) Download a portable version of DOSBox from right here: http://portableapps.com/apps/games/dosbox_portable and copy that to the same CD.

3.) OPTIONAL: Write an autorun script that kicks off DOSBox and feeds it the name of your executable at the same time.

4.) Burn the CD.

Forcing a modern OS to run a decrepitly ancient software framework will NEVER be more hackishly simple at any other time in your life, believe me I am a SysAdmin. It's not like I'm suggesting that you recompile BGI for static linkage or, god forbid, saying that you should write a shim.
Last edited on
oops sorry for any mistake on my part
ok ok i see that and sorry for any inconvenience on my part ...hey i would like to know one thing that why doesnt gotoxy function not work in quincy 2005 while it works in turboc++ also the turbo c++ written code for mouse programming is working fine in turbo c++..is there any alternative for both may i need to download external library
...is there any alternative for both...(?)

Yes there is, it would depend on your environment though. I would suggest Code::Blocks with MingW-64 as the compiler for a Windows environment. For *nix Code::Blocks and GCC.
Topic archived. No new replies allowed.