Hi Larry,
> Is there a way to make a C struct definition visible to all inline C
externals in a class?
The struct definition should remain in a .h file. Only the content
of the .c file goes to the external "C inline".
external "C inline use %"my_include_file.h%""
alias "[
...
]"
> What exactly happens during EiffelStudio's C code generation for
inline externals?
Each inline block gets generated in its own C function (like regular
Eiffel routines). It should be preceded in one way or another with
an #include line with the include file(s) that you would have
specified in the `use "..."` clause.
> Is there a way to share static helper functions or static variables
across inline C externals?
I would try not to use static variables. Remember Chris' story
with multi-threading.
On 08/12/2025 21:27, Liberty Lover wrote:
> Eric,
>
> Three libs were able to be inlined. Others ran into issues. See the
> report <
https://github.com/simple-eiffel/claude_eiffel_op_docs/blob/
> main/research/inline_c_migration_report.md>.
>
> On Sun, Dec 7, 2025 at 6:26 PM Eric Bezault <
er...@gobosoft.com
> <mailto:
er...@gobosoft.com>> wrote:
>
> Two remarks:
>
> - You should ask Claude provide implementations for Linux and MacOS
> as well, not just Windows.
>
> - Don't put the C code in a separate C file, which will need to
> be compiled separately. Instead, include the C code directly in
> your external routines. For example:
>
> c_sc_set_color (a_color: INTEGER): INTEGER
> external
> "C inline use %"simple_console.h%""
> alias
> "[
> save_default_color();
> return
> SetConsoleTextAttribute(get_stdout_handle(), (WORD)$a_color)
> ? 1 : 0;
> ]"
> end
>
> With that, no need to have to deal with a simple_console.obj file.
>
> --
> Eric Bezault
> mailto:
er...@gobosoft.com <mailto:
er...@gobosoft.com>
>
http://www.gobosoft.com <
http://www.gobosoft.com>
> > -
https://ljr1981.github.io/simple_registry/ <https://
>
ljr1981.github.io/simple_registry/>
> > -
https://ljr1981.github.io/simple_mmap/ <https://
>
ljr1981.github.io/simple_mmap/>
> > -
https://ljr1981.github.io/simple_ipc/ <https://
>
ljr1981.github.io/simple_ipc/>
> > -
https://ljr1981.github.io/simple_watcher/ <https://
>
ljr1981.github.io/simple_watcher/>
> > -
https://ljr1981.github.io/simple_clipboard/ <https://
>
ljr1981.github.io/simple_clipboard/>
> > -
https://ljr1981.github.io/simple_system/ <https://
>
ljr1981.github.io/simple_system/>
> > -
https://ljr1981.github.io/simple_env/ <https://
>
ljr1981.github.io/simple_env/>
> > -
https://ljr1981.github.io/simple_console/ <https://
>
ljr1981.github.io/simple_console/>
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Eiffel Users" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to
eiffel-users...@googlegroups.com
> <mailto:
eiffel-users%2Bunsu...@googlegroups.com> <mailto:
eiffel-
> <mailto:
eiffel->
> >
users+un...@googlegroups.com
> <mailto:
users%2Bunsu...@googlegroups.com>>.
> eiffel- <
https://groups.google.com/d/msgid/eiffel->
> > users/0c30ed25-030e-4824-8e93-ddf1403da51fn%
40googlegroups.com
> <
http://40googlegroups.com> <https://
> >
groups.google.com/d/msgid/eiffel-users/0c30ed25-030e-4824-8e93-
> <
http://groups.google.com/d/msgid/eiffel-
> users/0c30ed25-030e-4824-8e93->
> > ddf1403da51fn%
40googlegroups.com?
> utm_medium=email&utm_source=footer <
http://40googlegroups.com?
> utm_medium=email&utm_source=footer>>.
>
>
>