Cecilia
Cecilia

Reputation: 4741

How to set macros in Visual Studio 2010?

I'm trying to use the fix from 'int8_t' : redefinition error in config.h when trying to connect mysql cpp connector to visual studio 2010 which suggests setting a macro

HAVE_INT8_T=1

I know how to use the Preprocessor to define variables, but in that case, I would have expected the answer to be in the form

#define HAVE_INT8_T 1

Is this an equivalent suggestion? Or do I need to set the macro in a project settings menu somewhere?

If so, I've read the documentation for Property Pages, but I can't locate the Macros menu. A screenshot would be helpful, if this is the way I need to go.

Upvotes: 1

Views: 325

Answers (1)

Marco A.
Marco A.

Reputation: 43662

The scope is different if you declare it into the property pages for the entire Project or into just one file:

enter image description here

If you need that into one file only (or if you're comfortable with a header for that), go for it. Otherwise do it at project scope.

Upvotes: 1

Related Questions