[Vala] Generate the .vapi for libmodbus
- From: David López González <david lg proximasystems net>
- To: vala-list gnome org
- Subject: [Vala] Generate the .vapi for libmodbus
- Date: Thu, 01 Mar 2012 17:14:09 +0100
Hi,
I'm trying to generate the .vapi file for one of the latest versions of
libmodbus (3.0.2).
I'm using the following commands to get the vapi file:
vala-gen-introspect modbus modbus
vapigen --library modbus modbus/modbus.gi
And the output for the second one is:
modbus.gi:0.0-0.0: error: construction methods may only be declared
within classes and structs
modbus.gi:0.0-0.0: error: construction methods may only be declared
within classes and structs
modbus.gi:0.0-0.0: error: construction methods may only be declared
within classes and structs
Generation failed: 3 error(s), 0 warning(s)
I've noticed that the problem is because there are three functions in
the modbus.gi file starting with the word "new".
I've modified the libmodus code to change the word "new" in the three
functions.
After changing the code, I successfully generated the .vapi file with
the two commands.
The problem is that I don't want to change the libmodbus code to
generate the .vapi file.
There is any way to avoid the vapigen errors without changing the
libmodbus source code?
I'll appreciate any helpful information on this issue.
valac version: Vala 0.15.2
OS: openSUSE 11.4 (i586)
I found the commands to generate the .vapi file in the web:
https://github.com/btbytes/modbus-vala
Thank you!
David L.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]