Integrated Environment : TURBO C/C++ - Getting Started Answers to Common Questions
http://ingenuitydias.blogspot.com/2015/12/integrated-environment-turbo-cc-getting.html
Questions: Why is Turbo C++ not able to find any of my #include files?
Answers: The compiler searches for include files in the Turbo C++ Include Directories path. You can specify this path through the Options|Directories menu. The INSTALL program initially sets this path to the directory where it copied all the Turbo C++ *.h files.
Answers: The compiler searches for include files in the Turbo C++ Include Directories path. You can specify this path through the Options|Directories menu. The INSTALL program initially sets this path to the directory where it copied all the Turbo C++ *.h files.
Questions: Why do I get the message:
Linker Error: Unable to open input file 'C0x.OBJ' A. The linker searches for Turbo C++ start-up and library files in the Turbo C++ Library Directories path.
Linker Error: Unable to open input file 'C0x.OBJ' A. The linker searches for Turbo C++ start-up and library files in the Turbo C++ Library Directories path.
Answers: You can specify this path through the Options|Directories menu. The INSTALL program initially sets this path to the directory where it copied the start-up and library files.
Questions: How do I get Turbo C++ to link in my own libraries or use multiple source files?
Answers: Turbo C++'s Project facility is designed to allow you to work with multiple files.
Answers: Turbo C++'s Project facility is designed to allow you to work with multiple files.
[next]
Questions: Why does the linker tell me that all the graphics library routines are undefined?
Answers: The Options|Linker|Graphics Library item must be set ON, if you are using any Turbo C++ graphics functions and have not specified GRAPHICS.LIB in a project file.
Answers: The Options|Linker|Graphics Library item must be set ON, if you are using any Turbo C++ graphics functions and have not specified GRAPHICS.LIB in a project file.
Questions: Why does Turbo C++ report "Unable to open include file 'stdarg.h'" when I try to #include <stdio.h>?
Answers: The most probable reason is that you have exceeded the number of files that DOS can have open simultaneously. Add the line FILES=20 to your DOS CONFIG.SYS file. This allows DOS to open up to 20 files at the same time. CONFIG.SYS will only be effective after you have rebooted your computer. See the IBM DOS Reference Manual for details on the CONFIG.SYS file.
Answers: The most probable reason is that you have exceeded the number of files that DOS can have open simultaneously. Add the line FILES=20 to your DOS CONFIG.SYS file. This allows DOS to open up to 20 files at the same time. CONFIG.SYS will only be effective after you have rebooted your computer. See the IBM DOS Reference Manual for details on the CONFIG.SYS file.
Questions: How do I change the colors of the editor and menus in TC?
Answers: The utility TCINST.EXE allows you to customize your colors.
Answers: The utility TCINST.EXE allows you to customize your colors.
Questions: How do I get a listing of my source code to my printer?
Answers: From within the Turbo C++ editor press Ctrl-K-P. This will print a marked block to the printer. If no block is marked, this key sequence will print the entire file in your editor.
Answers: From within the Turbo C++ editor press Ctrl-K-P. This will print a marked block to the printer. If no block is marked, this key sequence will print the entire file in your editor.
[next]
Questions: When I Make, Run, or Trace a program, Turbo C++ sometimes goes through the compile and link process even when the object files are up-to-date.
Answers: Turbo C++'s MAKE logic works solely on a file's date and time stamp. If one of your source files is marked with a date that's sometime in the future, the object files that are created from it will always be older than the source file, and Turbo C++ will always try to rebuild the file. You can fix this by using TOUCH.COM to set the file to the current date and time. You should also make sure that your system's date and time are always properly set. TOUCH.COM is documented in the file UTIL.DOC.
Answers: Turbo C++'s MAKE logic works solely on a file's date and time stamp. If one of your source files is marked with a date that's sometime in the future, the object files that are created from it will always be older than the source file, and Turbo C++ will always try to rebuild the file. You can fix this by using TOUCH.COM to set the file to the current date and time. You should also make sure that your system's date and time are always properly set. TOUCH.COM is documented in the file UTIL.DOC.
Questions: How come my old Turbo C++ project files don't work anymore?
Answers: Project files now contain much more information about a project now, and hence are no longer stored in ASCII format. To create a project file, select PROJECT from the main menu, and follow the menus. To convert your old project files to the new format, use the supplied utility file PRJCNVT.EXE (documented in UTIL.DOC).
Answers: Project files now contain much more information about a project now, and hence are no longer stored in ASCII format. To create a project file, select PROJECT from the main menu, and follow the menus. To convert your old project files to the new format, use the supplied utility file PRJCNVT.EXE (documented in UTIL.DOC).
Questions: How can I convert my Turbo C 2.0 project files to the new format?
Answers: There is a conversion utility in your Turbo C++ BIN directory called PRJCNVT.EXE. This program will perform the conversion.
Answers: There is a conversion utility in your Turbo C++ BIN directory called PRJCNVT.EXE. This program will perform the conversion.
Questions: How come my project file is automatically loaded when I start TC. I want to work on a different program.
Answers: If there is only one project file in the current directory, Turbo C++ will load and use that one file. If there are no project files, or if there are multiple project files, Turbo C++ does not automatically load one.
Answers: If there is only one project file in the current directory, Turbo C++ will load and use that one file. If there are no project files, or if there are multiple project files, Turbo C++ does not automatically load one.
[next]
Questions: My right mouse button appears to do nothing. Can I change this so it will set breakpoints?
Answers: Yes, under the menu for Options|Environment|Mouse there is a dialog box for the right mouse button.You can change it to set breakpoints, or to do many other things.
Answers: Yes, under the menu for Options|Environment|Mouse there is a dialog box for the right mouse button.You can change it to set breakpoints, or to do many other things.
Questions: How do I get Turbo C++ to use extended or expanded memory?
Answers: Use the /X switch for extended and the /E switch for expanded when you invoke Turbo C++.
Answers: Use the /X switch for extended and the /E switch for expanded when you invoke Turbo C++.
Questions: How can I find out where my "null pointer assignment" is occurring?
Answers: Set a watch on the following expressions:
*(char *)0,4m
(char *)4
Answers: Set a watch on the following expressions:
*(char *)0,4m
(char *)4
Step through the program. When the values change, the just-executed line is the one that is causing the problem.
Questions: When I compile my program, I get the following error:
Error: C:\TC\INCLUDE\STDIO.H: Overlays only supported in medium, large, and huge memory models.What is happening?
Answers: The Overlay Support option has been selected and does not work in the tiny, small, or medium memory models.You may turn this option off with: Options|Compiler|Code Generation|Overlay Support
Answers: The Overlay Support option has been selected and does not work in the tiny, small, or medium memory models.You may turn this option off with: Options|Compiler|Code Generation|Overlay Support
Questions: When I try to load a new file after editing a file, the first file remains on the screen. How do I close the first file?
Answers: Use Alt-F3 to close the current file. Also, use F6 to move from one file to the next, if there is more than one file open at a time.
Questions: I'm doing a search and replace operation, and the editor prompts me for each replacement. I've selected "Change All", but it still does it.
Answers: To disable the prompting, you must unselect the "Prompt on replace" option on the left side of the dialog box.
Questions: When I try to use the any of the pseudo registers, like _AX, I get the error message "Undefined symbol '_AX' in function..." when I compile. Why?
Answers: You are only allowed to use the pseudo registers in the Turbo C++ and ANSI modes of the compiler. You can change this setting in the Options|Compiler|Source menu.
Answers: You are only allowed to use the pseudo registers in the Turbo C++ and ANSI modes of the compiler. You can change this setting in the Options|Compiler|Source menu.
Questions: Since I don't have a mouse, can I still copy blocks of code from one file to another?
Answers: Yes. You can mark the beginning and end of a block by moving to the appropriate area and pressing Ctrl-K-B (mark beginning) and Ctrl-K-K (mark end). You can then use the copy and paste commands in the Edit menu.
Answers: Yes. You can mark the beginning and end of a block by moving to the appropriate area and pressing Ctrl-K-B (mark beginning) and Ctrl-K-K (mark end). You can then use the copy and paste commands in the Edit menu.