Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[gcc][X11][Xlib.h] Problème de compilation (résolu)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
shakasan
n00b
n00b


Joined: 10 Nov 2004
Posts: 45
Location: Bruxelles

PostPosted: Thu Dec 16, 2004 4:42 pm    Post subject: [gcc][X11][Xlib.h] Problème de compilation (résolu) Reply with quote

Bonjour à tous,
J'ai un petit programme écris en C (juste un essai) sous X à l'aide de X11/Xlib.

J'utilise la commande suivante pour le compiler :
Code:
gcc -Wall frac.c -lX11 -L/usr/X11R6/include/X11 -o frac


Il me retourne :
Code:
/usr/lib.gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status


Je suis sous Gentoo, GCC 3.3.4, X.Org 6.8.0 et Gnome 2.8.0

Je précise que je viens de me lancer dans le programmation sous X et sous Linux tout court (mis à part Perl, bash et PHP).

Merci d'avance


Last edited by shakasan on Thu Dec 16, 2004 11:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
gim
Guru
Guru


Joined: 29 Apr 2003
Posts: 418
Location: milky-way

PostPosted: Thu Dec 16, 2004 7:29 pm    Post subject: Re: [gcc][X11][Xlib.h] Problème de compilation Reply with quote

Et avec ça ?
Code:
gcc -Wall frac.c -L/usr/X11R6/lib -lX11 -o frac
Back to top
View user's profile Send private message
shakasan
n00b
n00b


Joined: 10 Nov 2004
Posts: 45
Location: Bruxelles

PostPosted: Thu Dec 16, 2004 8:29 pm    Post subject: Reply with quote

Ca donne la même erreur
Je dois dire que je sais pas trop quoi faire là :roll:
Back to top
View user's profile Send private message
gim
Guru
Guru


Joined: 29 Apr 2003
Posts: 418
Location: milky-way

PostPosted: Thu Dec 16, 2004 9:56 pm    Post subject: Reply with quote

Sûr ??

Tu as bien un fichier nommé /usr/X11R6/lib/libX11.a ?
Back to top
View user's profile Send private message
shakasan
n00b
n00b


Joined: 10 Nov 2004
Posts: 45
Location: Bruxelles

PostPosted: Thu Dec 16, 2004 11:03 pm    Post subject: Reply with quote

Oops, milles excuses, je viens de réessayer et la compilation fonctionne

Merci merci :D

Par contre, le programme ne donne rien, même pas une fenêtre qui s'affiche.... :cry: (c'est juste un essai :wink: )

Code:
#include<X11/Xlib.h>
int main()
  {
  Display* dpy = XOpenDisplay(NULL);
  int sn = DefaultScreen(dpy);

  Window MaFenetre =
    XCreateSimpleWindow(dpy,
                        RootWindow(dpy,sn),
                        0, 0,
                        200, 200, 4,
                        BlackPixel(dpy,sn),
                        WhitePixel(dpy,sn));
  XMapWindow(dpy,MeFenetre);

  return 0;
  }
Back to top
View user's profile Send private message
gim
Guru
Guru


Joined: 29 Apr 2003
Posts: 418
Location: milky-way

PostPosted: Thu Dec 16, 2004 11:17 pm    Post subject: Reply with quote

shakasan wrote:
Par contre, le programme ne donne rien, même pas une fenêtre qui s'affiche.... :cry: (c'est juste un essai :wink: )
:(

Mais par contre, là, je peux pas t'aider ;)

Et "[gcc] ... (résolu)" merci ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum