I just opened someone else's Visual Studio project and in their build properties they have a few custom path macro's they are using for their include and lib directories. The macro names are things like this:
$(MY_WHATEVER_INCLUDE_DIR)
I could manually replace every single macro with the real path, but it would be nice to just use the macros. My question is, where do I define these custom path macros at?
View the current properties and macrosSelect Edit and then in the Edit dialog box, choose the Macros button. The current set of properties and macros visible to Visual Studio is listed along with the current value for each.
Open a project in the editor and run the macros by right clicking and choosing Run. Right clicking on the macro and choosing Edit brings up the Visual Studio Macro editor. You can either create new modules, macros or edit existing ones.
This link http://msdn.microsoft.com/en-us/library/a2zdt10t(v=vs.90).aspx could interest you. I didn't like the idea of changing my whole system configuration just to build a project. The most interesting part on the page is the last comment :
This page fails to mention how to get to this dialog:
From Property Manager, double click on a property page. Click on "User Macros" under "Common Properties" in the tree control.
Here the approach is described with pictures: https://sites.google.com/site/pinyotae/Home/visual-studio-visual-c/create-user-defined-environment-variables-macros
In Visual Studio you need to:
Here is a tutorial on Project Property Sheets: http://www.dorodnic.com/blog/2014/03/20/visual-studio-macros/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With