I just try to use wrap_c. My objective being to wrap the modbus protocol.
I'm on linux debian.
I use the https://github.com/eiffel-wrap-c/WrapC/tree/master/doc#understanding_wrapc as sources.
Naturally I try to start whit the basic example "hello_world".
here are my first try:
jacques@neuchatel:/Eiffel_archives/EWG/ewg_0_9_0/example$ wrap_c
--output-dir=/tmp/wrap/
--full-header=simple/library/manual_wrapper/c/include/simple_header.h
cc1: fatal error:
simple/library/manual_wrapper/c/include/simple_header.h: Aucun
fichier ou dossier de ce type
compilation terminated.
Syntax error in "simple_header_cpp.h" at line 1
jacques@neuchatel:/Eiffel_archives/EWG/ewg_0_9_0/example$ cat
simple/library/manual_wrapper/c/include/simple_header.h
#ifndef __EWG_SIMPLE_HEADER__
#define __EWG_SIMPLE_HEADER__
struct foo
{
int a,b,*pc;
};
typedef union
{
int a;
} foo1;
typedef enum
{
red,
blue,
green
} colors;
void func1 (int a, int b);
int func2 (int a, int b);
#endif
This is a little bit confusing :
fatal error: simple/library/manual_wrapper/c/include/simple_header.h: Aucun fichier ou dossier de ce type
and
Syntax error in "simple_header_cpp.h" at line 1
A syntax error in an unexisting file !
the wrap_c version is: wrap_c version 1.0.0
I also try, with a config option has suggested. Here is the result:
jacques@neuchatel:/Eiffel_archives/EWG/ewg_0_9_0/example$ wrap_c
--output-dir=/tmp/wrap/
--full-header=simple/library/manual_wrapper/c/include/simple_header.h
--config=simple/library/config.ewg
cc1: fatal error:
simple/library/manual_wrapper/c/include/simple_header.h: Aucun
fichier ou dossier de ce type
compilation terminated.
wrap_c: cannot read 'simple/library/config.ewg'
jacques@neuchatel:/Eiffel_archives/EWG/ewg_0_9_0/example$ cat
simple/library/config.ewg
<?xml version="1.0"?>
<ewg_config name="simple">
<rule_list>
<rule>
<match>
</match>
<wrapper type="default">
</wrapper>
</rule>
</rule_list>
-- Cordialement Jacques Silberstein