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       -n,--namespace=NAME
70              The  namespace  name.  This  name  should be capitalized, eg the
71              first letter should  be  upper  case.  Examples:  Gtk,  Clutter,
72              WebKit.
73
74       --no-libtool
75              Disable  usage  of  libtool  for  compiling  stub  introspection
76              binary. Use this if your build system does not require libtool.
77
78       --libtool
79              Full path to libtool executable.  Typically  used  for  Automake
80              systems.
81
82       --nsversion=VERSION
83              The  namespace  version.  For  instance 1.0. This is usually the
84              platform version, eg 2.0 for Gtk+, not 2.12.7.
85
86       -p,--program=PROGRAM
87              Specifies a binary that will be introspected.  This  means  that
88              the *_get_type() functions in it will be called for GObject data
89              types. The binary must be modified to take a  --introspect-dump=
90              option,  and to pass the argument to this function to g_ireposi‐
91              tory_dump.
92
93       --program-arg=ARG
94              Additional argument to pass to program for introspection.
95
96       --identifier-prefix=PREFIX
97              This option may be specified multiple times. Each  one  gives  a
98              prefix  that  will  be  stripped from all C identifiers. If none
99              specified, the namespace will be used. Eg, an identifier  prefix
100              of  Foo will export the identifier typdef struct _FooBar FooBar;
101              as Foo.Bar.
102
103       --symbol-prefix=PREFIX
104              This option may be specified multiple times. Each  one  gives  a
105              prefix  that  will be stripped from all C symbols. Eg, an symbol
106              prefix of foo will export  the  symbol  foo_bar_do_something  as
107              Foo.Bar.do_something.
108
109       --accept-unprefixed
110              If  specified,  the  scanner will accept identifiers and symbols
111              which do not match the namespace prefix. Try to avoid using this
112              if possible.
113
114       --output=FILENAME
115              Name  of  the file to output. Normally namespace + format exten‐
116              sion. Eg, GLib-2.0.gir.
117
118       --pkg=PACKAGE
119              List of pkg-config packages to get  compiler  and  linker  flags
120              from.  This  option  can  be specified multiple times to include
121              flags from several pkg-config packages.
122
123       --pkg-export=PACKAGE
124              List of pkg-config packages that are provided by  the  generated
125              gir. This option can be specified multiple times if the gir pro‐
126              vides more packages.  If not specified, the  packages  specified
127              with --pkg= will be used.
128
129       --verbose
130              Be verbose, include some debugging information.
131

ENVIRONMENT VARIABLES

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

BUGS

150       Report                              bugs                             at
151       https://gitlab.gnome.org/GNOME/gobject-introspection/issues
152

HOMEPAGE AND CONTACT

154       http://live.gnome.org/GObjectIntrospection
155

AUTHORS

157       Johan Dahlin
158
159
160
161
162                                                               G-IR-SCANNER(1)
Impressum