Introduction to vc6.0 Project Settings

Source: Internet
Author: User

After opening or creating a workspace with at least one project in a package, select "Settings…" in the project menu of vc6 ..." The command becomes effective. After you select it or press the hot key Alt + F7, the project Setting dialog box can be called up. The options here will affect the entire project establishment and debugging process, so it is very important, although most of the options do not need to be changed in general, understanding their meanings can eliminate the mysteries in our hearts and deepen our understanding of VC projects.

In this dialog box, the drop-down list box in the upper-left corner is used to select a project configuration, including Win32 debug, Win32 release, and all comprehenations ), some options have different default values in different project configurations. The Tree View on the left shows all the files and categories of the current project. If we set the project "Schedule" to highlighted (like 9-1), a total of ten tabs will appear on the right of the dialog box, listing various project-related options, many Tabs have a reset button. After you press it, you can restore the settings in the tab to the initial values when the project is generated. If we select a file class or a file in the Tree View, the tabs on the right of the dialog box will be automatically reduced to one or two, listing all the options related to the selected file class or file. Next, we will take Win32 debug as an example to look at the functions and meanings of the ten tabs related to the project. For tabs related to the file, please think about them by yourself.

General

This tab is relatively simple. The first option from top to bottom is used to change the method of using the MFC class library, do you still remember that we specified to use the MFC class library in DLL mode in step 5 of Appwizard? But now we can switch between the two methods at will. The second option is used to specify the directory for storing intermediate and output files generated during the compilation and connection process. For debugging versions, the default directory is the "debug" subdirectory under the project. The third option at the bottom is used to specify whether each project configuration can have its own file dependency (main finger file ), because the debugging and release versions of most projects share the same file dependency, you do not need to change this option.

Debug

The debug tab contains debugging-related options, as shown in Figure 9-2. Because there are many options, they are divided into several classes. We can select different categories from the category, the corresponding options are displayed. The C/C ++ and link tabs are also displayed.

In the general category, we can specify the executable file name to be debugged. If the program being compiled is a DLL, we should specify an EXE file to debug the DLL here. The other three options can be used to specify the working directory for debugging, the command line parameters sent to the program at the start of debugging, and the path of the executable file during remote debugging. After switching the category to additional DLLs, we can specify whether to load the debugging symbol information for some additional DLL at the start of the debugging. Only after the symbolic information is loaded Can we track the DLL.

C/C ++

The C/C ++ tab controls the vc6 compiler. There are many and complex options, so you should focus on it. As shown in 9-3, there is a project options edit box at the bottom. The various command switches listed in will be transmitted to the vc6 compiler as command line parameters at the beginning of compilation, to control the compilation process. These command switches will change as other options change. If you know some command switches, you can directly enter them in this edit box. The options corresponding to the switch will automatically change.

In the general category, the warning level is used to specify the level at which the compiler displays warnings. None indicates that no warning is displayed, L1 indicates that only severe warnings are displayed, and L2 indicates that warnings are worse than L1, l3 indicates a warning that is worse than L2, L4 indicates that all warnings are displayed, including those that are ignored for security. If warnings as errors is selected, each warning will cause an error. After compilation, the connector cannot be started for connection. The C/C ++ syntax is quite complex and strict, although the editor does not interrupt the project creation process after a warning is generated, however, warning information often indicates that the program has potential problems in some places. Therefore, we recommend that you set the warning level to L3 in the future and eliminate the warnings generated during compilation as much as possible. Optimizations is used to set the code optimization method. The optimization mainly aims to improve the running speed and reduce the program volume. However, sometimes these two purposes are mutually contradictory. In addition, in rare cases, the program runs normally without optimization. After the optimization measures are enabled, some inexplicable problems may occur in the program. In fact, most of these are potential errors in the program. Shutting Down optimization measures is often just a temporary solution. Debug info is used to specify the type of debugging information generated by the compiler. In the first lecture, the center Bell once introduced that vc6 supports the out-of-the-box editing function. To use this function, you must generate the debugging information of the "Program database for edit and continue" type here, but cannot generate debugging information compatible with earlier compilers. Preprocessor definitions is some pre-defined macro names. These macros are widely used in the MFC class library and Windows header files to set Conditional compilation.

The options in the C ++ language class involve some advanced features of the C ++ language, including representation of member pointers, exception handling, runtime type information, and construction displacement, they all have profound concepts, so We generally don't need to change them. The options in the code generation category involve how to generate the target code, here, we can select the type of the target processor, the type of the Runtime Library, the default transmission mode of parameters for function calling, and the alignment mode of structure members. In general, we can keep the default value. In the Customize category, the six options from top to bottom have the following meanings: whether to prohibit Microsoft's expansion of C ++, whether to allow function-level connections, and whether to eliminate repeated strings; whether to allow minimal reconstruction; whether to allow incremental compilation; whether to allow the compiler to output its version information to the output window at the start of running. The second and third items are gray because they are not compatible with the out-of-the-box editing function. If you select to generate debugging information of other types in the general category, you can change these two options.

In the listing files category, you can specify the compiler to generate the browsing information and listing file. The former can be generated by the browser information maintenance tool BSCMAKE, the latter contains the compilation commands corresponding to the C/C ++ source file after compilation. The optimizations category allows us to control the optimization measures in more detail. After selecting customize, we can select which Optimizations to perform, in Inline expansion, we can specify the Extension Method for inline functions. The precompiled headers class contains some options for precompiled header files, which are generally not changed. Preprocessor categories have some options for preprocessing. Here we can pre-define some macro names, specify some or all symbols with undefined states, and specify the directory where the extra files are contained.

Link

The link tab controls the vc6 connector, which is also complicated. As shown in 9-4, in the general category, we can specify the output file name and some additional library files or target files to be used during the connection process, the following five options are used to generate debugging information, ignore all default library files, allow incremental connection (this method can speed up the connection), and generate a map file; allows performance analysis.

Some options in the Customize category are the same as those in the general category. Select use program database to allow the use of the program database, so that the connector stores debugging information in the program database. If this option is not selected, the incremental connection method cannot be used. If force file output is selected, the connector will still generate a valid (but not necessarily run correctly) executable file even if a module references undefined or repeatedly defined symbols. In the debug category, we can specify whether the debugging information is in Microsoft format, coff format, or both, after separate types is selected, the connector will separate the debugging information and put it in the PDB file. This will make the connection faster, but the debugging speed will be slower. The input class contains some options related to the input library file. Here we can specify to use or not use some library files or target files. In the output class, there are some options related to the final output executable file, including: the base address of the program load, the entry address of the program, how much space is reserved for the stack, and the version number of the program. Although these options are empty, they all have their own default values, and generally do not need to be changed.

Resources

The resources tab controls the vc6 resource compiler. As shown in 9-5, we can specify the path of the resource file generated after compilation, the language type of the resource, and the additional resource inclusion directory.

Midl

This tab is related to the programming of COM (Component Object Model). We will not discuss it.

Browse info

On this tab, we can specify whether to generate a browsing information file while creating the project. With this file, in the text editor, we can quickly locate the definition or reference of a symbol through the corresponding commands of the Association menu.

Custom Build

This Tab allows us to add our own steps for creating a project. In commands, enter the command to be executed, and in outputs, enter the output file obtained after the command is executed, vc6 checks the time sequence between the output file and the source file, so that you can run the specified command again when necessary to regenerate the output file.

Pre-link step

This tab is used to add the command to be executed before the connection.

Post-build step

This tab is used to add the command to be executed after the project is created.

For example:

Copy debug/*. Lib ../lib

 

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.