admin管理员组文章数量:1389903
I am cross-compiling a legacy C++ project using CMake and Visual Studio 2022. The code compiles (mostly), but I am struggling to get Intellisense to work correctly when compiling not for Windows. I followed this page and I am setting the CMAKE_C_COMPILER
and CMAKE_CXX_COMPILER
in the toolchain file. When I do that (and regenerate the cache), it appears that it it working:
< Intellisense expansion shows __VERSION__
defined as 4.9.2
>
However, the actual compiler version is not what Intellisense shows, as you can see in the build:
< Compiler message shows __VERSION__
defined as 4.6.3
>
Is there any way to figure out where VS is pulling this information from? Does anyone know why it is not getting it correctly? I am having other issues with Intellisense not finding system includes (but again, the compiler does), and I imagine that these are related.
本文标签: cVisual Studio Intellisense incorrect macro expansion with CMakeStack Overflow
版权声明:本文标题:c++ - Visual Studio Intellisense incorrect macro expansion with CMake - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744629029a2616425.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论