Bonjour tout le monde.
Je suis étudiant en cycle de prepa intégré dans une école d'ingénieur en informatique.
Je cherche à faire une interface pour un programme et j'ai donc choisi d'utiliser la bibliothèque gtk.
C'est cette année que je découvre linux, code blocks, les makefiles ou les commandes de compilation qu'il faut ajouter dans les build options...blablabla
Donc peut être que mon problème viens de là aussi et si vous avez des remarques à me faire sur n'importe quoi allez y, je suis là pour apprendre.^^
Merci d'avance à vous.
Voici mes trois fichiers sources que j'utilise:
callback.ccallback.hmain.c
Voilà mes paramètres de compilations:
Dans build options -> debug -> compiler settings -> other options j'ai:
Dans build options -> debug -> linker settings -> other linker options j'ai:`pkg-config --cflags gtk+-2.0`
`gcc -c main.c -o main.o $(pkg-config --cflags gtk+-2.0 gmodule-2.0)`
`gcc -c callback.c -o callback.o $(pkg-config --cflags gtk+-2.0 gmodule-2.0)`
`gcc -o main main.o callback.o $(pkg-config --libs gtk+-2.0 gmodule-2.0)`
Et enfin voilà les détails de mon fichier xml:`pkg-config --libs gtk+-2.0`
Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99 <?xml version="1.0" encoding="UTF-8"?> <interface> <requires lib="gtk+" version="2.24"/> <!-- interface-naming-policy project-wide --> <object class="GtkWindow" id="main_window"> <property name="can_focus">False</property> <property name="border_width">6</property> <property name="title" translatable="yes">VOLCARM</property> <property name="window_position">center</property> <property name="default_width">1500</property> <property name="default_height">800</property> <signal name="destroy" handler="gtk_main_quit" swapped="no"/> <child> <object class="GtkVBox" id="vbox"> <property name="visible">True</property> <property name="can_focus">False</property> <child> <object class="GtkStatusbar" id="statusbar"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">2</property> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> <property name="pack_type">end</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkHBox" id="hbox"> <property name="visible">True</property> <property name="can_focus">False</property> <child> <object class="GtkScrolledWindow" id="scrolledwindow1"> <property name="width_request">620</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">automatic</property> <property name="vscrollbar_policy">automatic</property> <child> <object class="GtkViewport" id="viewport1"> <property name="visible">True</property> <property name="can_focus">False</property> <child> <object class="GtkImage" id="image"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="stock">gtk-missing-image</property> <property name="icon-size">6</property> <signal name="button-press-event" handler="cb_loadimage" swapped="no"/> </object> </child> </object> </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkScrolledWindow" id="scrolledwindow2"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">automatic</property> <property name="vscrollbar_policy">automatic</property> <child> <object class="GtkViewport" id="viewport2"> <property name="visible">True</property> <property name="can_focus">False</property> <child> <object class="GtkTextView" id="textview"> <property name="visible">True</property> <property name="can_focus">True</property> </object> </child> </object> </child> </object> <packing> <property name="expand">True</property> <property name="fill">True</property> <property name="position">1</property> </packing> </child> </object> <packing> <property name="expand">True</property> <property name="fill">True</property> <property name="pack_type">end</property> <property name="position">1</property> </packing> </child> </object> </child> </object> </interface>
Partager