Re: Static compilation of hello world



El Jueves, 19 de Junio de 2003 19:18, Miguel Mendez escribió:
On Thu, 19 Jun 2003 18:20:32 +0200
Patricia Balbastre Betoret <patricia disca upv es> wrote:

Hi,

gcc `pkg-config --libs --cflags gtk+-2.0`  -static -o base-static

Is this exactly what you typed? There's no reference to the c file :-)

gcc `pkg-config --libs --cflags gtk+-2.0`  -static -o base-static \
base-static.c

should do the trick.

Cheers,

Ups ... well, once the little mistake was fixed, more errors appear:

gcc `pkg-config --libs --cflags gtk+-2.0`  -static -o base-static base.c
/tmp/ccwW8hUR.o(.text+0x1c): In function `main':
: undefined reference to `gtk_init'
/tmp/ccwW8hUR.o(.text+0x29): In function `main':
: undefined reference to `gtk_window_new'
/tmp/ccwW8hUR.o(.text+0x3a): In function `main':
: undefined reference to `gtk_widget_show'
/tmp/ccwW8hUR.o(.text+0x42): In function `main':
: undefined reference to `gtk_main'
collect2: ld returned 1 exit status
make: *** [static] Error 1

And I suppose that now this has to be with the static option ... I really do 
not know how to solve it ... Help!!!


-- 
Patricia Balbastre Betoret
Departamento de Informatica de Sistemas y Computadores
Camino de Vera, 14, E-46071, Valencia, Spain
Tel: +34 96 387 70 00 Ext 75707
Fax: +34 96 387 75 79
http://ttt.upv.es/~patbalb1
-----------------------------
http://www.fsf.org/philosophy/no-word-attachments.es.html




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]