the evil VC -- Visual C++ project, macro, output file

in visual c++ project setting, we can use the following macro to reference to the output file name, such as:

incase we have the output file as: $(OutDir)\xxx.lib


$(TargetName) refers to 'xxx'
$(TargetExt) refers to '.lib'


this two macro is quite of useful when we use the post build steps, such as, we want to copy the output file into another directory on post build action, the script should write:

COPY $(OutDir)$(TargetName)$(TargetExt) $(DestPath)



你可能感兴趣的:(C/C++)