Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide simple example #34

Open
gavr123456789 opened this issue Jul 12, 2020 · 3 comments
Open

Provide simple example #34

gavr123456789 opened this issue Jul 12, 2020 · 3 comments

Comments

@gavr123456789
Copy link

I am not familiar with all this and would like to try using third-party GObject libraries from D (other than gtkd).

It would be useful to have a simple example here using an GObject(from C or Vala) with multiple properties and functions from D GObject.

@MikeWey
Copy link
Member

MikeWey commented Jul 12, 2020

The simplest example of using girtod would be:

girtod -i GMenu-3.0.gir

where GMenu-3.0.gir can be just the name of the gir file of the library, which is then searched for in the know gir repository, of it can be a full path to the gir file.

For a more involved example where some manual intervention is needed to get a working binding you could look at AtkD: https://github.com/gtkd-developers/AtkD

@gavr123456789
Copy link
Author

❯ ls
 build.ninja            'girtod@exe'/        meson-logs/          TestShared-0.1.typelib
 compile_commands.json   libTestShared.so*   meson-private/       VERSION
 girtod*                 meson-info/         TestShared-0.1.gir

❯ set -x LD_LIBRARY_PATH .
❯ set -x GI_TYPELIB_PATH .
❯ ./girtod -i .
Error: APILookup.txt not found, check '--help' for more information.
❯ ./girtod -i TestShared-0.1.gir
Error: GIR file: '/usr/share/gir-1.0/TestShared-0.1.gir' not found.

What am I doing wrong?

@MikeWey
Copy link
Member

MikeWey commented Jul 19, 2020

gittod doesn't currently use the environment variables.

The easiest in this case would probably be to specify the path to the gir file:

./girtod -i ./TestShared-0.1.gir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants