Configuring the TC2.0 Runtime Environment

Source: Internet
Author: User

First, the learning process

Download TC2.0 and open

This is an integrated C environment package, including TC, DOSBox, and some compilation tools, so it's clear that I can't judge the functionality of a single program, nor can I tell which programs are necessary.

So in order to figure out which files are used to resolve which features, I create a new folder C:\minic to hold the files that are known to solve the problem.

There are two ways to prevent programs from locating related files that are not in the same directory by setting the search path: (1) do not let the default path of the setting point to the directory that contains the associated files. (2) Copy all the files of the system we are studying to a directory that is not likely to be a search path for system settings.

For the first method, first of all to find out how the program is set the default search path, I think that in the configuration of the Java environment in the system environment variables to add the relevant path, so that when the program is used to locate the installed JDK based on this path, then we are here to automatically add the environment variables in the program installation? If so, you can avoid lookups as long as you change the environment variables, but we do not know which environment variables are in effect when the program is looked up. In an online article, "How to find the header file and the search path of the library," there is a sentence: "The default header file directory is determined by the compiler itself", you can also create a new folder to avoid the way to find. If you are not looking for a fixed file by a specific path, but you are looking for a wide range, find out what the scope of the search is, whether you want to search subdirectories under that folder, search all siblings, search for the entire file, or search all files within the system. So you can use method two to create a new folder so that it is not in the search scope, the new D:\tc2.0 folder on the textbook, that the folder is not within the scope of the search, but my XP virtual machine only a C drive, so I decided to create a new C:\TC folder to see if this file is in the search path, The results of the experiment will not be the same as the data. Create results

Copy the Tc.exe to the C:\minic and run it.

Description TC did not find the required file, and the folder is not within the scope of the search. Two new files appear in the Found folder as determined:

Empty the TC's working path:

Write the simple.c and save to C:\minic:

Compile with Complie display success:

Simple.obj was created in C:\minic\PROJECT:

Connect Simple.obj with TC to display errors:

The reason is: unable to open input file ' COS. OBJ ':

No Simple.exe under the C:\minic.

Then we find cos.obj in the original directory and put it in, the result is the next error:

Find EMU.LIB and put it in, the result is the next error:

Find MATHS.LIB and put it in, the result is the next error:

Find GRAPHICS.LIB and put it in, the result is the next error:

Then find CS.LIB put in, and finally successfully generated the Simple.exe file:

The required files for TC to connect an OBJ file are: Cos.obj, EMU. LIB, MATHS. LIB, GRAPHICS. LIB, CS. Lib.

Ii. problems to be solved

(1) How does Java and other programs find files related to JDK? Answer: Look through the path in the system or user's environment variable.

(2) What are the required files for TC connection to obj file? A:the required files for TC to connect an OBJ file are: Cos.obj, EMU. LIB, MATHS. LIB, GRAPHICS. LIB, CS. Lib.

Iii. Unresolved issues

(1) TC program is how to set the default search path to find related files?

(2) Why does the TC Program compile C files that do not require additional files?

(3) What is the process of TC connection to obj file? What are the functions of the related files?

Iv. Learning Impressions

When we are confronted with complex and unknown things, we must learn to analyze them in a simple and effective way. It is difficult to find the files that are necessary for the C language to compile the connection in the original directory of the TC program . Then we may wish to change a way of thinking,TC Main program is definitely necessary, we put the main program and external contact close, and then compile the running file, according to the error prompt to find the required files. If the final connection succeeds, then the files we find are definitely the necessary files. This idea is very common in programming, we take the other people's program to see, if a file to look at the code to figure out the function, then it takes time and energy, but if from the perspective of functional implementation, I only understand that I want to implement the part of the code, even if I just know the function and interface of this file, Even if I knew that the program was necessary for the project to be implemented, it was enough. There are three realms of Buddhism: the first is "look at the mountain is the mountain, see Water is water"; the second is "look at the mountain is not a mountain, see water is not water"; The third one is "look at the mountain or mountain, see water or water". The simple things look complex is to pay attention to every detail, the complexity of things to see Simple is to pay attention to efficiency, we do things when the reasonable choice of things to do the best way to achieve maximum value.

Configuring the TC2.0 Runtime Environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.