How to know where a certain macro is defined in Vi

2019-07-19 18:24发布

I currently have a visual studio project that uses DirectX. There are some macros in the code such as

__range(0, m_lBatchSize)  LONG  m_nBatched;
__field_ecount_opt(m_lBatchSize) IMediaSample  **      m_ppSamples;

I wanted to know which files these macros are defined in. Normally in Visual Studio I would click goto definition and it would take me to the definitio. It is not taking me anywhere in this case. Does that feature work for macros ? Is there any way for me to find out where this macro is defined ?

1条回答
老娘就宠你
2楼-- · 2019-07-19 19:12

my trick is to put

#define __range FOO

in my code, the preprocessor will then say

__range already defined at xxxx.nn
查看更多
登录 后发表回答