The classic Turbo C++ compiler can be used as either an integrated development environment or a command-line tool. While compiling and running a program from within the Turbo C++ editor will both generate object files and link them automatically, you can do it manually one step at a time at the command line. The command "tcc /c file1.cpp" will create an unlinked .obj file out of your code, allowing you to link it later yourself.
Open Command Prompt, found under "Accessories" in the Start menu. (The "Start" menu is the Windows-logo button on the lower-left-hand corner of the screen).
Change the current directory to that which contains your .obj files using the "cd" command. If the files are in a folder named Programming under My Documents and your name is Philippe, then this would look like the following:
Run the Turbo C++ linker using the "tlink" command. This command takes the .obj filenames, the desired .exe filename, the desired .map filename and any .lib filenames as arguments, separated by commas. Multiple files are combined with pluses and any type of file unused can be left out. If you have two .obj files and use no external libraries in your code, the command could look like this:
tlink file1.obj + file2.obj, hello.exe
If you use the standard libraries, however, you must include them manually. Assuming Turbo C++ is installed under C:\TC, a program with one .obj file that uses the standard libraries would be linked like this:
tlink \TC\LIB\C0S.obj + file.obj, hello.exe, , \TC\LIB\CS.lib
- "Turbo C++ Version 3.0 Online Help"; Borland International, Inc.; 1992
- Opus Software: The Makefile