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++?
Chris
Create a cool, new character for your Windows Live™ Messenger. Check it out
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++?
Chris
Create a cool, new character for your Windows Live™ Messenger. Check it out
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.
If your C and C++ compilers are gcc and g++, you'll probably be okay,
as both understand most of the same options and interpret them the
same. If you try to use unrelated compilers, the C++ compiler may not
like being passed options which were intended for the C compiler.
--
Glynn Clements <glynn@gclements.plus.com>
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@bergenheim.net)
Wolf Bergenheim 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
Yes there is; see Rules.make (6.x) or Compile.make (7.0).
--
Glynn Clements <glynn@gclements.plus.com>