Problemas al compilar con gcc en suse usando X
Hola uso un ejemplo básico para crear una ventana con POR y mirad lo que me sale
$ g++ x11.c
/tmp/ccDVla9R.o(.text+0x25): En la función `main':
x11.c: undefined reference to `XOpenDisplay'
/tmp/ccDVla9R.o(.text+0x64):x11.c: undefined reference to `XDisplayCells'
/tmp/ccDVla9R.o(.text+0x98):x11.c: undefined reference to `XAllocNamedColor'
/tmp/ccDVla9R.o(.text+0xb6):x11.c: undefined reference to `XAllocNamedColor'
/tmp/ccDVla9R.o(.text+0xfe):x11.c: undefined reference to `XCreateSimpleWindow'
/tmp/ccDVla9R.o(.text+0x122):x11.c: undefined reference to `XChangeWindowAttributes'
/tmp/ccDVla9R.o(.text+0x133):x11.c: undefined reference to `XMapWindow'
/tmp/ccDVla9R.o(.text+0x141):x11.c: undefined reference to `XFlush'
/tmp/ccDVla9R.o(.text+0x17b):x11.c: undefined reference to `XCreateSimpleWindow'
/tmp/ccDVla9R.o(.text+0x18f):x11.c: undefined reference to `XMapWindow'
/tmp/ccDVla9R.o(.text+0x1a4):x11.c: undefined reference to `XFlush'
collect2: ld returned 1 exit status
$
$ g++ x11.c
/tmp/ccDVla9R.o(.text+0x25): En la función `main':
x11.c: undefined reference to `XOpenDisplay'
/tmp/ccDVla9R.o(.text+0x64):x11.c: undefined reference to `XDisplayCells'
/tmp/ccDVla9R.o(.text+0x98):x11.c: undefined reference to `XAllocNamedColor'
/tmp/ccDVla9R.o(.text+0xb6):x11.c: undefined reference to `XAllocNamedColor'
/tmp/ccDVla9R.o(.text+0xfe):x11.c: undefined reference to `XCreateSimpleWindow'
/tmp/ccDVla9R.o(.text+0x122):x11.c: undefined reference to `XChangeWindowAttributes'
/tmp/ccDVla9R.o(.text+0x133):x11.c: undefined reference to `XMapWindow'
/tmp/ccDVla9R.o(.text+0x141):x11.c: undefined reference to `XFlush'
/tmp/ccDVla9R.o(.text+0x17b):x11.c: undefined reference to `XCreateSimpleWindow'
/tmp/ccDVla9R.o(.text+0x18f):x11.c: undefined reference to `XMapWindow'
/tmp/ccDVla9R.o(.text+0x1a4):x11.c: undefined reference to `XFlush'
collect2: ld returned 1 exit status
$
2 Respuestas
Respuesta de ricarlitr0
1
Respuesta de dfmarin
1