C ++ project configuration-Visual Studio development environment

Source: Internet
Author: User

0. It is mainly used to add the header file path, library file path, and library

. \: Indicates the current folder (that is, the folder where the. H,. cpp file is located)

.. \: Indicates the parent folder

1. Configuration: Debug, release, all configurations (both Debug and release versions are often required in Projects)

Platform: Win32, x64 (when the 64-bit software/header file is referenced, otherwise the referenced lib will have an error: The. OBJ file cannot find the referenced XX function)

2. General

  • General-> output directory: $ (SolutionDir) ...... \ lib \ $ (Configuration )\
  • General-> intermediate Directory: $ (SolutionDir) $ (ConfigurationName)
  • General-> Configure slave (dynamic database .dll,static database .lib,application program .exe)
  • General-> character set (using multi-byte character sets and Unicode character sets (commonly used character sets during project development ))

3. c/C ++-> General-> additional include directory :.. \.. \.. \.. \ include ;.. \.. \.. \.. \.. \ 3rdparty \ boost_000046_1; Inc;

4. linker

  • Linker-> General-> output file:... \ bin \ Program (projectname0000.exe
    // The generated .exe file is in the bin folder under the parent folder of the. h,. cpp folder.
  • Linker-> General-> additional library Directory :.. \.. \.. \.. \ lib \ $ (Configuration );.. \.. \.. \.. \.. \ 3rdparty \ boost_000046_1 \ lib; C: \ Program
    Files (x86) \ MySQL Server 5.5 \ lib; % (AdditionalLibraryDirectories)
  • Linker-> input-> additional dependencies: sknet. lib; sknetlib. lib; databasedll. lib; % (AdditionalDependencies)

5. Generate events-> post-generate events-> command line

Copy datastruct. H... \ include \ datastruct. h

Copy dbhelp. H... \ include \ dbhelp. h

Copy userbll. H... \ include \ userbll. h

Copy databasedll. H... \ include \ databasedll. h // Description: the header file databasedll. H is being output to the public include directory...

Xcopy/E/C/y Inc $ (solutiondir)... \ .. \ include \ Network \

// SKIM (trunk (include, lib, src (server, client), doc)

VC project file description
  • The. opt project parameter file for the development environment. Such as the tool bar position and other information;
  • . Aps (AppStudio File), Resource auxiliary File, binary format, usually don't worry about it.
  • . The clw ClassWizard information file is actually in the INI file format. If you are interested, please study it. sometimes the ClassWizard has a problem. You can manually modify the CLW file to solve the problem. if this file does not exist, you will be prompted to re-create it each time you use ClassWizard.
  • . Dsp (workflow studio Project): A Project file in the text format. If you are not familiar with it, Do not manually modify it. DSW (workflow studio Workspace) is a Workspace file. Other features are similar to those of DSP.
  • . Plg is a compilation information file. The error and warning information files during compilation (actually an html file) are generally of little use. there is an option in Tools-> Options to control the generation of this file.
  • . Hpj (Help Project) is the Project for generating Help files, which can be processed using microsfot Help Compiler.
  • . Mdp (Microsoft DevStudio Project) is an earlier version of the Project file. To open this file, you will be prompted to convert it to a new DSP format.
  • . Bsc is used to browse project information. This file is required if Source Brower is used. if you do not need this function, you can remove the Generate Browse Info File in Project Options to speed up compilation.
  • . Map is the image information record file of the execution file, unless you are very familiar with the underlying system, this file is generally not needed.
  • . Pch (Pre-Compiled File) is a Pre-Compiled File, which can speed up compilation, but the File is very large.
  • . Pdb (Program Database) Records Program-related data and debugging information, which may be useful during debugging.
  • . Exp is generated only when the DLL is compiled, and some information in the DLL file is recorded. It is generally useless.
  • . Ncb does not compile the browsing file (no compile browser ). You can delete this file when the Automatic completion function fails. It is automatically generated after build.
Macros configured by the VC Project

ConfigurationName

Configuration name, usually Debug or Release

IntDir

The intermediate directory used by the compiler to generate the obj file.

OutDir

Output directory used by the linker

ProjectDir

Project directory

ProjectName

Project name

SolutionDir

Solution directory

TargetDir

Directory of the target output file

TargetExt

Target output Extension

TargetFileName

Target output file name, including the extension

TargetName

Target output name, excluding the extension

TargetPath

Full path name of the target output file

Related Article

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.