Re: [hatari-devel] WinUAE emulation bugs in 2013 / use of C++ compiler for Hatari build?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On sunnuntai 10 helmikuu 2013, Nicolas Pomarède wrote:
> On 05/02/2013 22:34, Eero Tamminen wrote:

> As long as some parts of Hatari are in C, keeping the cpu
> core in C and merging WinUAE's code seems easier to me (also, I don't
> consider WinUAE's core to be C++ in the object sense of the term, it's
> more about using try/catch to avoid C's goto/longjmp ; I'd rather have a
> WinUAE's core written in portable C by Toni Wilen :) ).

OK.


> As for the UI part in C++, all Hatari's code is in C. So using a C++ cpu
> core would still require that the UI can interact with the rest of the
> code in C.

Interaction is no problem.  C and C++ are compatible:

* If one would compile everything with C++, some fixes may be needed to
  the C-code as C++ compiler is stricter with types.

* If one wants to mix object files compiled with both C and C++ compilers
  into same binary, then the headers for C-compiler compiled objects would
  need adding this:
----
	#ifdef __cplusplus
	extern "C" {
	#endif
....
	#ifdef __cplusplus
	}
	#endif
----
  To tell C++ compiler to switch off symbol name mangling for them.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/