On Fri, 11 Oct 2013 00:03:00 +0000 Felipe Magno de Almeida <felipe.m.alme...@gmail.com> said:
> Hello, > > Currently, writing modules for enlightenment using C++ is not possible > without modifying headers from enlightenment. > > How is the policy for these headers w.r.t C++ compatibility? > > The most common problems are: > * Lack of extern "C"; you can always: extern "C" { #include "e.h" } in your c++ module. beware. you MUST also ensure your module symbols for init/shutdown etc. are not mangled. > * The use of C++ keywords, e.g., class (replaced for klass); like above. you can split your module into the c++ and c sections, having the c sections wrap/access e and expose to the c++ section. :) the c++ section never sees e includes. :) > * Functions and macros defined in the header with implicit conversion > from unrelated pointer types; > * Typedefs before definition or declaration of the typedef'ed UDT. as above. you can split. create a c interface shim to e that doesnt expose these things and exposes a c++ friendly interface... and you need to do this split anyway to ensure the module init/shutdown etc. apis are not mangled... so... why would you want a c++ module? (like ALL of it entirely in c++?) > Regards, > -- > Felipe Magno de Almeida > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel