Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I add preprocessor #define in devenv command line?

Is there a way to add extra preprocessor #define in devenv command line?

like image 882
Paulius Liekis Avatar asked Nov 23 '09 13:11

Paulius Liekis


People also ask

What is a #include preprocessor?

The #include directive tells the C preprocessor to include the contents of the file specified in the input stream to the compiler and then continue with the rest of the original file. For example, the header file, file.h contains the following: char *func (void);

What is the preprocessor command in C?

The preprocessor is a program that sends the source code before it passes through the compiler. It operates under preprocessor directives which begin with the symbol #.

What is the preprocessor command?

What Does Preprocessor Directive Mean? Preprocessor directives are lines included in a program that begin with the character #, which make them different from a typical source code text. They are invoked by the compiler to process some programs before compilation.

What is a preprocessor example?

Examples of some preprocessor directives are: #include, #define, #ifndef etc. Remember that the # symbol only provides a path to the preprocessor, and a command such as include is processed by the preprocessor program. For example, #include will include extra code in your program.


1 Answers

I am not entirely sure what you mean by vcbuild command line but if you mean the Visual C++ command line compiler then you can add defines by add /Dxxxx, e.g.

cl.exe /DSHAREWARE ....

Additional answer based on comments:

You should be able to set the CL environment variable with the extra preprocessor define:

SET CL=/DSHAREWARE
devenv ....

Mere information can be found at MSDN

like image 91
HakonB Avatar answered Sep 18 '22 11:09

HakonB