Colin Watson writes:
 > On Mon, Dec 02, 2002 at 12:26:37PM +0000, Pedro Quaresma de Almeida wrote:
 > > But when I do the command
 > > 
 > > > gcc xdriver.c
 > > 
 > > I got
 > > 
 > > -----------------//------------------
 > > /usr/lib/crt1.o: In function `_start':
 > > /usr/lib/crt1.o(.text+0x18): undefined reference to `main'
 > 
 > Indeed, you don't have a main(). If this is a driver rather than a
 > program, perhaps you want to compile it as a shared object?
 > 

The program is in another file "exemplo.c", but the problem is in this
driver.

 > 
 > You need to link the X library using -lX11.
 > 

That's my problem! When I do 

      > gcc xdriver.c -shared -lX11 -o xdriver.so 

I get

      /usr/bin/ld: cannot find -lX11
      collect2: ld returned 1 exit status

But I have the xlibs...

ii  xlibs          4.1.0-5        X Window System client libraries
ii  xlibs-dev      4.0.3-4        X Window System client library development


Is this a problem with the PATH, I have tried to compile with

-I/usr/include

but without any luck.

-- 

Pedro Quaresma de Almeida
e-mail: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to