使用预处理器指令定义输出路径
使用以下伪代码:
#define BUILD_PATH "C:/MyBuild/"
#define BUILD_NAME "mydll.dll"
// Set build path here
表示我希望如何将当前项目(dll)构建到 C:/MyBuild/mydll.dll 中,如何仅使用预处理器指令来完成此任务?
Using the following pseudo-code:
#define BUILD_PATH "C:/MyBuild/"
#define BUILD_NAME "mydll.dll"
// Set build path here
representing how I would like to build the current project (a dll) into C:/MyBuild/mydll.dll, how would I accomplish this by only using preprocessor directives?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可能会误解,但我真的无法理解你为什么要这样做,但它是可行的:
我无法准确地重申你有多少不想这样做......
如果你想获取输出那么,恐怕……你不能。该信息来自预处理器之后的几个步骤,因此预处理器无法获取该信息。
I may be misunderstanding, but I really cannot understand WHY you want to do this but it is doable:
I cannot re-iterate enough exactly how much you don't want to be doing this though ...
If you want to GET the output path via pre-processor info then, I'm afraid ... you can't. That info comes from several steps after the pre-processor so there is no way the pre-processor could get that info.