Some operations and compilation Basics
Author: lixiaosan
Time: 09/06/2006
First, you must note that the patch SP6 of vc6 needs to be installed after vc6 is installed. Go to the download page. SP6 solves some previously discovered problems.
1. After installing any SDK, the general configuration of VC is incorrect.
If the SDK has installation instructions, follow the installation instructions. If no description is provided, You need to include the include and library paths of the Development Library in the menu tools> Option> directories> of VC, in addition, it is best to place the added path before other paths. If there is a DLL, copy the required DLL to the current directory of your program.
2. the source code has not been changed, and compilation is still required for each compilation.
The possible cause is that you have modified the system time of the current machine, or compiled the project to the VC on another machine, while the system time of other machines is faster than the system time of your machine. VC compilation determines which file needs to be compiled based on the file modification time.
Solution: Change the system time of the current machine a little earlier, then modify the files and compile them once. Then change the time back and re-compile.
3. An error occurred in on_message (), on_registered_message (), on_thread_message (), on_registered_thread_message () in Release versions.
Q195032:
PRB: incorrect function signatures may cause problems in release
Http://support.microsoft.com/kb/195032/en-us
4. # include "" And # include <> Differences
Include "is to start searching from the local directory and then go to the System Path
Include <> On the contrary, first search from the system directory and then from the local directory
For details, see the # include direve VE in the msdn article.
Http://msdn2.microsoft.com/en-us/library/36k2cdd4.aspx
5. support Unicode compilation for projects
Here we will explain the reasons for using Unicode: If you want your software to support multiple languages, that is, internationalization, such as the East Asian CJK (China, Japan, and South Korea ), since each character in these national languages is represented by a wide character (wide character is two bytes), and the Unicode character set (Unicode Character Set) is a wide character set, so it is natural to use Unicode.
The following describes how to compile Unicode in vc6.
1. Choose build> deployments> Add to add a unicode debug.
2. Choose build> set Active configuration and select Win32 Unicode debug.
3. Choose project> Settings> C/C ++ Properties> category, select Preprocessor, and add _ Unicode to Preprocessor definitions.
4. Select "project"> "Settings"> "link property"> "category", select "output", and write "wwinmaincrtstartup" to "entry-point symbol. If you do not perform this step, the error "unresolved external symbol _ winmain @ 16" will occur ".
5. character string processing in the encoding process. For example, tchar should be used to replace char; where the C Runtime library is used, the corresponding function with the prefix "_ tcscpy" should be used to replace, for example, strcpy is replaced by _ tcscpy; where the string is displayed, the _ text () (or _ T () macro is used, as shown in figure
"ABC" is replaced by _ T ("ABC.
Related Articles: http://www.codeproject.com/cpp/unicode.as
6. Double-click the DSW file of vc6 to open multiple instances of vc6.
Sometimes, you need to open multiple vc6 projects, but unfortunately, each time you double-click the DSW file, it will overwrite the original project.
The solution is as follows:
Resource Manager-> Tools-> Folder Options-> file type-> select DSW-> advanced-> edit-> uncheck "Use DDE"
7. Set the stack size in VC
Sometimes, when a large array is allocated, an error occurs during running, prompting stack overflow. The reason is that in a 32-bit system,
The heap memory can reach 4 GB space, but the stack space is generally limited. In vc6, the default stack space is 1 MB. Therefore, you can use the new operator to dynamically unallocate memory on the heap.
If you need a large array without dynamically allocating memory, you can modify the stack size in vc6:
Select output> reserve in project> Settings> link> category to set the stack size. The minimum value is 4 bytes.
However, opening a large stack will increase the memory overhead.
8. How to move custom visual c ++ ide to other computers
Http://support.microsoft.com/kb/q247005/