Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Laser9 on October 01, 2014, 04:42:16 am

Title: How to setup CPPFLAGS in Code::Blocks?
Post by: Laser9 on October 01, 2014, 04:42:16 am
How do I setup in Code::Blocks the same thing as the following line?

CPPFLAGS = -DDATA_DIR=\"$(datadir)/$(PACKAGE)\" -DSNAP_DIR=\"~\" -DPREF_DIR=\"~\"

where \" equals "

Do I put these values in the Settings -> Compiler -> "OPTIONS"??? somewhere or do I have to type the above line in a Makefile

or  .xml file somewhere?  My code wants to know what PREF_DIR is in if(PREF_DIR != '~') and such.

Also , how do I set the $(datadir)/$(PACKAGE) variables for the path of DATA_DIR???

This is the latest error for trying to compile GLTron for Linux then for the GCW-Zero!

Thanks!

Title: Re: How to setup CPPFLAGS in Code::Blocks?
Post by: oBFusCATed on October 01, 2014, 09:19:08 pm
It looks like you're using some makefile based build system to build some software.
If this is the case you're almost on your own. C::B doesn't know anything about all these variables mentioned in your post.

Probably the only thing you can do is to edit the make command in the build options.
Search for "Make" command in the build options dialog.