Where to add compiler option flags?

Topics for the Eclipse Environment
Post Reply
tpannone
Posts: 67
Joined: Fri Feb 15, 2013 1:04 pm

Where to add compiler option flags?

Post by tpannone » Fri Dec 21, 2018 11:16 am

Within Eclipse, I want to add a "-D" option flag to the compiler preprocessor. I'm looking at Settings>Tool Settings>GNU C++ Compiler>Preprocessor. Is that where I add the -D option flag?

User avatar
Forrest
Posts: 277
Joined: Wed Apr 23, 2008 10:05 am

Re: Where to add compiler option flags?

Post by Forrest » Fri Dec 21, 2018 2:51 pm

Yes, in the Preprocessor page of the GNU C++ Compiler settings, there is an option for setting defined symbols (-D)
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn

tpannone
Posts: 67
Joined: Fri Feb 15, 2013 1:04 pm

Re: Where to add compiler option flags?

Post by tpannone » Wed Jan 02, 2019 6:57 am

Thanks Forrest.

tpannone
Posts: 67
Joined: Fri Feb 15, 2013 1:04 pm

Re: Where to add compiler option flags?

Post by tpannone » Wed Jan 02, 2019 9:31 am

One final question Forrest. Is the -D portion assumed? For example, in the window for Defined Symbols (-D) would I enter -Dname or just name.

User avatar
Forrest
Posts: 277
Joined: Wed Apr 23, 2008 10:05 am

Re: Where to add compiler option flags?

Post by Forrest » Wed Jan 02, 2019 11:11 am

The -D will be added automatically. You just need to add name.
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn

Post Reply