VC++6.0 download, installation and usage tutorial

I. Introduction

Microsoft's original version of VC6.0 is no longer easy to find. All versions available online have been modified by third parties, with some unused functions deleted and compatibility enhanced. Here we use the complete green version of VC6.0, which can support general C/C++ application development and computer level two exams.

2. VC6.0 download

VC6.0 complete green version

Link: https://pan.baidu.com/s/1REp8-JqYaNpOh1y4d0WpHw?pwd=qv5sExtraction
code: qv5s

The software is only 31M, fast to download, simple to install, no need to set up various components, and can be uninstalled cleanly.

VC6.0 can run well under XP without any additional settings, but under Win7, Win8 and Win10, the compatibility mode must be modified after the installation is completed.

There is also an enterprise version available

Link: https://pan.baidu.com/s/15lxpI-KVH3qVQ7007bMjOQ?pwd=n4da
Extraction code: n4da

3. VC6.0 installation

3.1 It is recommended to install Windows XP system directly on the virtual machine, because VC6.0 can run perfectly under XP without any additional settings.

3.2 Perfectly solve the problem of being unable to create new projects after installing VC6 on Windows 7

  • Download the File Tools compressed package.

Link: https://pan.baidu.com/s/1vp6k-gfqwAi21q2nF7Odew?pwd=tb1n
Extraction code: tb1n

  • Unzip it to the installation directory ("C:\Program Files\Microsoft Visual
    Studio\Common\MSDev98\AddIns")
  • Register the DLL module. Run the registration.bat in administrator mode and then enter the decompression directory as prompted. (I type it character by character when typing. You can also edit the batch file first and paste the path into variable a. Save and then execute.)
@echo off
title 注册
echo 请右键选择“以管理员模式运行”
echo 请输入您将“FileTool.dll”复制到了哪个^<文件夹^>
set a=C:\Program Files\Microsoft Visual Studio\Common\MSDev98\AddIns
set file=”%a%\FileTool.dll”
regsvr32 %file%
  • Start Visual C++ 6.0, and don’t remind you again if you should. Go to Tools->Customize…. In the pop-up window, select Add-ins and Macro Files, and check FileTool Developer Studio Add-in. Close the window Then the toolbar (AO) will appear.
  • Be careful not to run Visual C++ 6.0 in XP compatible mode.
  • Finish.

4. Run C language program under VC6.0

C-Free supports compilation and linking of a single source file, but under VC6.0, you must first create a project and then add the source file.
A real software often requires multiple source files and multiple resources, such as pictures, videos, controls, etc. They are usually placed in a folder for effective management. You can think of a project as such a folder, and the IDE manages these files through the project. There are different types of projects. For example, to develop a "black window" console program, you need to create a Win32 Console Application project; to develop a GUI program with an interface, you need to create a Win32 Application project.

4.1 Create a new Win32 Console Application project

Open VC6.0, select "File -> New" in the menu bar, or Ctrl+N, the following dialog box will pop up:
Insert image description here
switch to the "Project" tab, select "Win32 Console Application", fill in the project name and path, and click "OK", a dialog box will pop up asking for the type, here select "An Empty Project", as shown in the figure below:

Insert image description here
Click the "Finish" button to complete the creation of the project.

Insert image description here

4.2 Create a new C source file

Select "File -> New" in the menu bar, or Ctrl+N, and the following dialog box will pop up:
Insert image description here
switch to the "File" tab, select "C++ Source File", fill in the file name, and click OK to complete.

This step is to add source files to the project just created.
Insert image description here

4.3 Writing C language code

You can see the project and source files you just created in the workspace, as shown in the following figure:

Insert image description here
Double-click hello.c to enter the editing interface and enter the code in the previous section.

Insert image description here

4.4 Compile and run the code

You can find the functions of compiling, building and running in the "Build" menu, as shown in the figure below:

Insert image description here

A simpler method is to use shortcuts, as shown in the figure below:
Insert image description here
Save the written source code, click the run button or Ctrl+F5, if the program is correct, you can see the running results, as shown in the figure below:
Insert image description here

Note: The .exe file generated by compilation is in the Debug folder in the project directory. Taking the above project as an example, the path is E:\cDemo. When you open it, you will see a Debug folder. When you enter it, you can see cDemo.exe.

You will also see a file named hello.obj in the Debug directory. .obj is an object file generated by VC/VS, similar to the .o file under C-Free.
Insert image description here

4.5 Project Document Description

Enter the project directory E:\cDemo. In addition to hello.c, you will also see many other files. They are created by VC6.0 to support the current project and do not belong to the scope of C language. You can ignore them.
Insert image description here

If readers are interested, we also provide simple instructions:

.dsp file: DeveloperStudio Project, project file (text format), used to save information about the current project, such as compilation parameters, included source files, etc. Manual editing is not recommended. When you need to open a project, just open the file.

.dsw file: DeveloperStudio Workspace, workspace file, similar to DSP.

.opt file: IDE's Option file, which saves the configuration of the development environment related to the current project, such as toolbar position, open files, cursor position, etc.

.plg file: Log file (HTML file), which saves the compilation information of the program, such as errors and warnings.

A project can contain multiple source files and resource files (pictures, videos, etc.), but can only generate one binary file, such as executable program .exe, dynamic link library .dll, static link library .lib, etc. The project type determines different configuration information and the generation of different binary files.

A workspace can contain multiple projects and can generate multiple binary files in batches.

The larger programs we install generally contain multiple EXEs and DLLs in the installation directory. For such a program, you can first create a workspace and then create multiple projects, so that you can generate multiple required binary files at once.

Guess you like

Origin blog.csdn.net/lcy1619260/article/details/132603313