开发者

unable to use turboc through xp. why? solution?

开发者 https://www.devze.com 2022-12-25 03:33 出处:网络
I\'m having problems opening directly TurboC++ compiler(dos version) on Windows X. if I click on the TurboC++ icon through windows GUI it opens for a sec(a blank dos screen)

I'm having problems opening directly TurboC++ compiler(dos version) on Windows X. if I click on the TurboC++ icon through windows GUI it opens for a sec(a blank dos screen) and shuts down. so i have to access it through the command line i.e.,

cmd  (enter)
c:\tc\bin (enter)
tc.exe

This way TurboC++ opens and I'm able to program and everything..

Why do I have to always start tc.exe through开发者_如何学编程 the command line? Why can't I start it through Windows XP?

Also, after starting tc.exe through the command line, I am unable to execute any graphics program through it.

I write a simple code for creating a circle using predefined functions.. when i compile and run the program tc.exe exits and returns back to the command prompt.

Why does this happen?Is there a solution?

I have also tried using DosBox to run TurboC++. it closes on executing the graphics program.

ps: this problem has occurred to only me and my friend..... all PCs in our college have Windows XP or Vista installed and they have no problems. im using initgraph(); function for initialising graphics drivers(using autodetect) and graphic mode.i have given the proper address for bgi files. and the folder contains the file required (EGAVGA.bgi). this program works fine in our college.does this have something to do about my graphics card(nvidia 9400 1gb)?


Graphics in the 80s were a completely different world than today - directly accessing hardware, often using undocumented features to optimize performance. Drivers didn't exist in DOS. Each program had to write their own hardware layer (hence why under DOS, you had to configure the video and soundcard for every single game separately. The fact that we can run any software from the 80s is a testament to the backwards compatibility work done by Microsoft.

You might have some luck running it on VirtualPC, VMWare or VirtualBox. All of them offer a free version, and if you can find and old copy of DOS 6.22 lying around, you might be good to go. Otherwise, you'll likely be stuck finding a physical 486 running Windows 3.11, and working on that. Depending on what deals your college has with Microsoft, they should be able to get a copy of DOS 6.22 for free - it's still offered for download on MSDN. Although, if you're still using TurboC++, they have not likely signed up for anything with MS. You can also try FreeDOS.


Right click on the TC icon and pick Properties. Go to the Compatibility tab. Play with the settings found there. If that doesn't help, ask your teacher how to use a 25 year old program on a modern computer.


How are you doing graphics? If you're using int 10h (or equivalent) to change the mode, that should work fine as it stands. If you're using BGI, make sure the program's working folder contains the BGI files that come with Turbo C++ -- for more details on initializing BGI, look up initgraph in the help.

Even modern PCs with modern graphics cards seem to have enough legacy support for the BGI code to work, though it seems like the program always runs fullscreen once in graphics mode, rather than in a window.

I don't know why Turbo C++ might not start from the GUI unfortunately. I've used Borland C++ just now to refresh my memory about the BGI stuff, and it worked OK.


Use visualc++ express instead. Its free and equipped with c++11.


for opening problem you can use a .bat file for opening Turbo C++ as follows:

open notepad and type the address of TC.exe and name of exe file like D:\bhanu\TurboC++\TC.exe

and save it as TC.bat instead of TC.txt and now double click it to run TC.

For graphics you first copy EGAVGA.BGI file from bgi folder to bin and then in the Turbo c++ open options->linker->library and mark 'X' on bottom two libraries and un-mark all other libraries.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号