现在的位置: 首页 > 综合 > 正文

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

2013年08月23日 ⁄ 综合 ⁄ 共 380字 ⁄ 字号 评论关闭

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)

抱歉!评论已关闭.