OSDN Git Service

dd7e0c9cf4bbe8934a61795104392166e6f5671e
[bacon/BaCon-Japanese.git] / 関数・命令 / PRAGMA.txt
1   PRAGMA
2
3   【1.0 bulid 29 追加】
4    PRAGMA <OPTIONS x> | <LDFLAGS x> | <COMPILER x> | <INCLUDE x>
5
6    Type: statement
7
8    Instead of passing commandline arguments to influence the behavior of
9    the compiler, it is also possible to define these arguments
10    programmatically. Mostly these arguments are used when embedding
11    variables or library dependent structures into BaCon code. Example when
12    SDL code is included in the BaCon program:
13
14    PRAGMA LDFLAGS SDL
15    PRAGMA INCLUDE SDL/SDL.h
16
17    Example when GTK2 code is included in the BaCon program:
18
19    PRAGMA LDFLAGS `pkg-config --cflags --libs gtk+-2.0`
20    PRAGMA INCLUDE gtk-2.0/gtk/gtk.h
21    PRAGMA COMPILER gcc
22
23    Example on passing optimization parameters to the compiler:
24
25    PRAGMA OPTIONS -O2 -s
26
27    Multiple arguments can be passed too:
28
29    PRAGMA LDFLAGS iup cd iupcd im
30    PRAGMA INCLUDE iup.h cd.h cdiup.h im.h im_image.h
31