一千萬個為什麽

搜索

Visual C ++預處理器定義

Is there a way to transfer C++ preprocessor definitions into a custom pre-link step procedure call as a command-line parameter or export them into a file any other way?
Example: Let's say, I have a C++ project, and in it's Debug configuration I put a preprocessor definition like MAKUMBA_OBA=0x13
Then I add custom pre-link step which executes some JavaScript like

sarahjessicaparker.js /to tomsrhinoplasty $(MAKUMBA_OBA)

它會很棒,如果它只是起作用,但我從來沒有在我的js中得到第三個參數。所以問題是:如何將預處理器定義傳遞給s腳本?

最佳答案

沒有辦法做這樣的事情。唯一可接受的解決方案是分析構建配置文件名稱並相應地執行操作。

轉載註明原文: Visual C ++預處理器定義