简体   繁体   English

在VS2013中定义宏的位置

[英]Where to define Macros in VS2013

I'm using Visual Studio 2013 and wanted to use some Macros from the C++ Eigen Library ( these ), but I don't know how to. 我正在使用Visual Studio 2013,并且想使用C ++ Eigen库( 这些 )中的一些宏,但是我不知道该怎么做。 I found this stackoverflow question , but their solutions don't work for VS2013. 我发现了这个stackoverflow问题 ,但是他们的解决方案不适用于VS2013。

EDIT - Answer : 编辑-答案:

The question that I linked already had the answer from user @Cam Jackson. 我链接的问题已经有了@Cam Jackson用户的答案。 Actually, I didn't know that Property Manager (View -> Other windows -> Property Manager) is not the same thing as the "Right-click -> Properties" of the project. 实际上,我不知道Property Manager(视图->其他窗口-> Property Manager)与项目的“右键-> Properties”不是同一回事。 I'm quoting the answer : 我在引用答案:

'User Macros' will only display under 'Common Properties' if the property sheet that you're editing is specific to the project/solution! 仅当您正在编辑的属性表特定于项目/解决方案时,“用户宏”才会显示在“公共属性”下! So what you need to do is open the Property Manager window in VS, right-click on your project and add a new property sheet. 因此,您需要做的是在VS中打开“属性管理器”窗口,右键单击您的项目并添加一个新的属性表。 Then right-click->Properties on the newly created sheet, and you will now see the 'User Macros' option underneath 'Common Properties'! 然后在新创建的工作表上单击鼠标右键->“属性”,您现在将在“公共属性”下面看到“用户宏”选项! Hope that helps :) 希望有帮助:)

The question that I linked already had the answer from user @Cam Jackson. 我链接的问题已经有了@Cam Jackson用户的答案。 Actually, I didn't know that the Property Manager (View -> Other windows -> Property Manager) is not the same thing as the "Right-click -> Properties" of the project. 实际上,我不知道属性管理器(“视图”->“其他窗口”->“属性管理器”)与项目的“右键单击->属性”不同。 I'm quoting the answer : 我在引用答案:

'User Macros' will only display under 'Common Properties' if the property sheet that you're editing is specific to the project/solution! 仅当您正在编辑的属性表特定于项目/解决方案时,“用户宏”才会显示在“公共属性”下! So what you need to do is open the Property Manager window in VS, right-click on your project and add a new property sheet. 因此,您需要做的是在VS中打开“属性管理器”窗口,右键单击您的项目并添加一个新的属性表。 Then right-click->Properties on the newly created sheet, and you will now see the 'User Macros' option underneath 'Common Properties'! 然后在新创建的工作表上单击鼠标右键->“属性”,您现在将在“公共属性”下面看到“用户宏”选项! Hope that helps :) 希望有帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM