1G-IR-SCANNER(1)                                                G-IR-SCANNER(1)
2
3
4

NAME

6       g-ir-scanner - Extracting C metadata from sources and headers
7

SYNOPSIS

9       g-ir-scanner [OPTION...] FILES...
10

DESCRIPTION

12       g-ir-scanner is a tool which generates GIR XML files by parsing headers
13       and introspecting GObject based libraries. It is usually invoked during
14       the  normal  build  step  for a project and the information is saved to
15       disk and later installed, so that language bindings and other  applica‐
16       tions  can use it. Header files and source files are passed in as argu‐
17       ments on the command line. The suffix  determines  whether  a  file  be
18       treated  as  a source file (.c) or a header file (.h). Currently only C
19       based libraries are supported by the scanner.
20

OPTIONS

22       --help Show help options
23
24       --quiet
25              If passed, do not print details of normal operation.
26
27       --warn-all
28              Display warnings for public API which is not introspectable.
29
30       --warn-error
31              Make warnings be fatal errors.
32
33       --format=FORMAT
34              This parameters decides which the resulting format will be used.
35              The default value is gir.
36
37       --include=NAME
38              Add the specified introspection dependency to the scanned names‐
39              pace.  NAME is of the form NAMESPACE-VERSION, like Gtk-3.0.
40
41       --include-uninstalled=PATH
42              Add the specified introspection dependency to the scanned names‐
43              pace.  This differs from --include in that it takes a file path,
44              and does not process the pkg-config dependencies (since they may
45              not be installed yet).
46
47       --add-include-path=PATH
48              Add  a  directory to the path which the scanner uses to find GIR
49              files. Can be used multiple times to specify  multiple  directo‐
50              ries
51
52       -i,--library=LIBRARY
53              Specifies  a  library that will be introspected. This means that
54              the *_get_type() functions in it will be called for GObject data
55              types.  The  name  of the library should not contain the leading
56              lib prefix nor the ending shared library suffix.
57
58       -L,--library-path=PATH
59              Include this directory when searching for a library. This option
60              can  be specified multiple times to include more than one direc‐
61              tory to look for libraries in.
62
63       -Idirectory
64              Include this directory in the list of directories to be searched
65              for header files. You need to pass to the scanner all the direc‐
66              tories you'd normally pass to the compiler when using the speci‐
67              fied source files.
68
69       --c-include=C_INCLUDES
70              Headers  which should be included in C programs. This option can
71              be specified multiple times to include more than one header.
72
73       -n,--namespace=NAME
74              The namespace name. This name  should  be  capitalized,  eg  the
75              first  letter  should  be  upper  case.  Examples: Gtk, Clutter,
76              WebKit.
77
78       --no-libtool
79              Disable  usage  of  libtool  for  compiling  stub  introspection
80              binary. Use this if your build system does not require libtool.
81
82       --libtool
83              Full  path  to  libtool  executable. Typically used for Automake
84              systems.
85
86       --nsversion=VERSION
87              The namespace version. For instance 1.0.  This  is  usually  the
88              platform version, eg 2.0 for Gtk+, not 2.12.7.
89
90       -p,--program=PROGRAM
91              Specifies  a  binary  that will be introspected. This means that
92              the *_get_type() functions in it will be called for GObject data
93              types.  The binary must be modified to take a --introspect-dump=
94              option, and to pass the argument to this function to  g_ireposi‐
95              tory_dump.
96
97       --program-arg=ARG
98              Additional argument to pass to program for introspection.
99
100       --identifier-prefix=PREFIX
101              This  option  may  be specified multiple times. Each one gives a
102              prefix that will be stripped from all  C  identifiers.  If  none
103              specified,  the namespace will be used. Eg, an identifier prefix
104              of Foo will export the identifier typdef struct _FooBar  FooBar;
105              as Foo.Bar.
106
107       --symbol-prefix=PREFIX
108              This  option  may  be specified multiple times. Each one gives a
109              prefix that will be stripped from all C symbols. Eg,  an  symbol
110              prefix  of  foo  will  export the symbol foo_bar_do_something as
111              Foo.Bar.do_something.
112
113       --accept-unprefixed
114              If specified, the scanner will accept  identifiers  and  symbols
115              which do not match the namespace prefix. Try to avoid using this
116              if possible.
117
118       --output=FILENAME
119              Name of the file to output. Normally namespace +  format  exten‐
120              sion. Eg, GLib-2.0.gir.
121
122       --pkg=PACKAGE
123              List  of  pkg-config  packages  to get compiler and linker flags
124              from. This option can be specified  multiple  times  to  include
125              flags from several pkg-config packages.
126
127       --pkg-export=PACKAGE
128              List  of  pkg-config packages that are provided by the generated
129              gir. This option can be specified multiple times if the gir pro‐
130              vides  more  packages.  If not specified, the packages specified
131              with --pkg= will be used.
132
133       --verbose
134              Be verbose, include some debugging information.
135

ENVIRONMENT VARIABLES

137       The g-ir-scanner uses the XDG_DATA_DIRS variable to check for dirs, the
138       girs are located in XDG_DATA_DIRS/gir-1.0. It is normally set on a dis‐
139       tribution so you shouldn't need to set it yourself.
140
141       The variable GI_SCANNER_DISABLE_CACHE ensures that the scanner will not
142       write cache data to $HOME.
143
144       The  variable  GI_SCANNER_DEBUG  can  be  used  to  debug issues in the
145       build-system that involve g-ir-scanner. When it is set  to  save-temps,
146       then g-ir-scanner will not remove temporary files and directories after
147       it terminates.
148
149       The variable GI_HOST_OS can be used to control the OS name on the  host
150       that  runs the scanner. It has the same semantics as the Python os.name
151       property.
152

BUGS

154       Report                             bugs                              at
155       https://gitlab.gnome.org/GNOME/gobject-introspection/issues
156

HOMEPAGE AND CONTACT

158       http://live.gnome.org/GObjectIntrospection
159

AUTHORS

161       Johan Dahlin
162
163
164
165
166                                                               G-IR-SCANNER(1)
Impressum