[GRASS-dev] GRASS and C++
Wolf Bergenheim
wolf+grass at bergenheim.net
Tue Jun 9 14:50:02 EDT 2009
On 06/09/2009 07:41 PM, Glynn Clements wrote:
> chris carleton wrote:
>
>> I just read on the development Wiki that there is limited support for
>> C++ and was hoping someone could clarify that. If I'm writing a module
>> can I use C++?
>
> You're welcome to try. The main issue is that most of the configure
> checks are performed using the C compiler, and any Makefile variables
> are set appropriately for the C compiler.
>
Also note that there is no default rule to build C++ files into .o files
so you need to add (not so sure about the implicit %.o: %.cpp rule
though...)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $< -o $@
CMD_OBJS = $(subst .cpp,.o,$(wildcard *.cpp))
Before you include include $(MODULE_TOPDIR)/include/Make/Module.make
--Wolf
--
Wolf Bergenheim (wolf+grass at bergenheim.net)
More information about the grass-dev
mailing list