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 proj开发者_运维问答ect (a dll) into C:/MyBuild/mydll.dll, how would I accomplish this by only using preprocessor directives?
I may be misunderstanding, but I really cannot understand WHY you want to do this but it is doable:
#pragma comment( linker, "/out:c:\mydll.dll" )
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.
精彩评论