CECIL - missing declaration

[email protected] Fri, 22 Jul 2005 21:48:40 +0200 (CEST)
Newsgroups gmane.comp.lang.eiffel.smalleiffel
Message-ID <[email protected]>
Hello,

I'd like to mention a small problem with CECIL.
I had discovered this with SmartEiffel 1.1, but it's still present in SmartEiffel 2.1. I didn't try SE 2.2beta, but I guess there hasn't been much work on this part recently.

The problem appears when you want to include Eiffel features in a C main program as described in tutorial/cecil/example7.
When you do both compiling steps (.e -> .c and .c -> executable) separately, you'll first get a .c file and an eiffel.h file. You're then supposed to include eiffel.h in your C main program and to call initialize_eiffel_runtime(argc,argv) to start the Eiffel runtime environment.

The problem is: eiffel.h does not contain the declaration of initialize_eiffel_runtime.

When you add the declaration manually to the C program like this:

#include "eiffel.h"
void initialize_eiffel_runtime(int argc,char*argv[]);

everything is fine.

Also, there is *no* problem if you do the whole compilation in one step as described in the tutorial. The first compilation step produces another intermediate .h file, example.h, which in fact contains the declaration of initialize_eiffel_runtime, and which seems to solve the problem when you do a complete compilation.
But as I understand it, it was not meant to include both .h files in your C program, apart from the fact that this doesn't work either, because it causes other errors.

I think the generated eiffel.h file should contain this declaration.

Thanks

Nils Pansch