Turn: VS Solutions directory structure set up

https://www.cnblogs.com/zuibunan/p/3843459.html

The following articles are also described

https://blog.csdn.net/lp310018931/article/details/47991759

https://www.cnblogs.com/ljy339/p/9808482.html

 

You need to manually create the directory under the 3rd

Directory under the bin directory needs to be created manually

Do not configure command md $ (SolutionDir) .. \ bin \ $ (ConfigurationName)

Configuration Properties -> General -> intermediate directories: $ (SolutionDir) .. \ temp \ compile \ $ (ConfigurationName) Configuration of modified ConfigurationName
Configuration Properties -> General -> Output Directory: $ (SolutionDir) .. \ temp \ link \ $ (ConfigurationName) Configuration of modified ConfigurationName
Configuration Properties -> Debug -> Command: $ (SolutionDir) .. \ bin \ $ (ConfigurationName) \ $ (TargetFileName) modify ConfigurationName for Configuration
Configuration Properties -> Debug -> working directory: $ (SolutionDir) .. \ bin \ $ (ConfigurationName) \ modify ConfigurationName for Configuration
 
Related to the configuration: 
intermediate directory used when the project is compiled; 
the output catalog items are linked; 
after program compilation, copy generation dll and lib to the specified directory; 
After completion of the project compiled copies required dll to output directory; 
setting items working directory; 
EXE working directory and execute when the debugger; 


use to configure macros: 
ConfigurationName configuration name, usually the debug or Release 
IntDir intermediate directory used by the compiler, output obj file 
output directory OutDir used by the linker 
ProjectDir project directory 
ProjectName project name 
SolutionDir solutions directory 
directory TargetDir target output file where the 
extension TargetExt target output 
TargetFileName target output file name, including the extension 
TargetName target output name, not including the extension 
TargetPath target output file's full path name 


below to Sticker set an example to show the directory structure of the process: 
Sticker directory structure: 
Sticker 
    + - 3rd (third-party libraries)
    | + - DLL 
    | | + - Debug 
    | | + - Release 
    | + - lib 
    | | + - Debug 
    | | + - Release 
    | + - the include 
    | 
    + - src (source) 
    | + - - Sticker 
    | | + - Sticker project code 
    | + - StickerLibrary 
    | | + - StickerLibrary project code 
    | + - Sticker.sln 
    | 
    + - XAR (script) 
    | + - Sticker 
    | + -. .. 
    | 
    + - DOC (document) 
    | 
    + - bin (executable file) 
    | + - Debug 
    | + - Release 
    | 
    + - the TEMP (intermediate directories) 
        + - the compile 
        | + - Debug 
        | + - Release
        + - Link 
            + - Debug 
            + - Release 

1. Create a folder Sticker \ src 
2. Create an empty solution Sticker.sln, placed Sticker \ src in 
3. Create Project Sticker 
4. Properties -> Configuration is set to "all configuration", this will set the debug configuration release \ simultaneously 
5. configuration properties -> General -> intermediate directories: $ (SolutionDir) .. \ TEMP \ the compile \ $ (the ConfigurationName) 
. 6. configuration properties -> General -> output directory: $ (SolutionDir) .. \ TEMP \ Link \ $ (the ConfigurationName) 
7. The configuration properties -> C / C ++ -> General -> additional include directories: "$ (SolutionDir) .. \ 3rd \ the include " 
8. The configuration properties -> linker -> General -> additional library directories:" $ (SolutionDir) .. \ 3rd \ lib \ $ (the ConfigurationName) " 
9. The configuration properties -> linker -> input -> additional dependencies: xxx1.lib xxx2.lib xxx3.lib 
10. the configuration properties -> generate an event -> after generating event -> command line:Command line: 
    md $ (SolutionDir) .. \ bin \ $ (ConfigurationName)
    $ Copy (the TargetPath) $ (SolutionDir) .. \ bin \ $ (the ConfigurationName) 
    Copy $ (SolutionDir) .. \ 3rd \ DLL \ $ (the ConfigurationName) $ (SolutionDir) .. \ bin \ $ (the ConfigurationName) 
11. The configuration properties -> debug -> command: $ (SolutionDir) .. \ bin \ $ (ConfigurationName) \ $ (TargetFileName) 
12. configuration properties -> debug -> working directory: $ (SolutionDir) .. \ bin \ $ (ConfigurationName) \

  

Guess you like

Origin www.cnblogs.com/swing07/p/10955027.html