Re: Help compiling Xlib

2000-07-18 Thread Eric G . Miller
On Mon, Jul 17, 2000 at 09:37:13PM +0300, Lehel Bernadt wrote:
 
 On 17-Jul-2000 Dinesh Nadarajah wrote:
  I am trying to compile a simple X application but I
  keep getting the folloeing error:
  
  gcc -g -o testapp test1.c -lX11
  
  /usr/bin/ld: cannot find -lX11
  collect2: ld returned 1 exit status
  
  Any suggestions? What are the Xlib libraries called
  under Linux.  Thanks.
 
 
 You'll need xlib6g-dev.

The X11 libs aren't normally in gcc's search path, you need both the
search path *and* the library to link:

$ gcc -g -O2 -o bar foo.c -L/usr/X11R6/lib -lX11

-- 
According to MegaHAL:
The emu is a mass of incandescent gas, a gigantic nuclear furnace.



Re: Help compiling Xlib

2000-07-18 Thread Pavel M. Penev


On Mon, 17 Jul 2000, Dinesh Nadarajah wrote:

 I tried all sorts of combinations but don't seem to be
 able to get it going. What is the name of the Xlib
 library files? Here are the things I tried. Any other
 advice?
 
 Thanks.
 
 --- Pavel M. Penev [EMAIL PROTECTED]
 wrote:
  
  
  On Mon, 17 Jul 2000, Dinesh Nadarajah wrote:
  
   I am trying to compile a simple X application but
  I
   keep getting the folloeing error:
   
   gcc -g -o testapp test1.c -lX11
   
   /usr/bin/ld: cannot find -lX11
   collect2: ld returned 1 exit status
   
   Any suggestions? What are the Xlib libraries
  called
   under Linux.  Thanks.
   
   -D
   
  
  xlib6g installs its libraries under /usr/X11R6/lib/
  (try dpkg --largemem
  -L xlib6g) and are trying to have names compatible
  with all other
  distributions. I think the problem is that xlib6g
  does not make
  /usr/lib/X11 to be a symlink to /usr/lib/X11R6 where
  ld likes to look for
  the libraries. Either make the symlink, or give ld
  (gcc will pass
  appropriate arguments to ld) a -L/usr/X11R6/lib
  switch.
  
  This is for now,
  Pavel M. Penev
  
 
 

And what you should have tried is:

gcc -L/usr/X11R6/lib -lX11 other gcc options file.c

Sorry for misleading you in a way.

Hope you suceed this time,
Pavel




Re: Help compiling Xlib

2000-07-17 Thread Pavel M. Penev


On Mon, 17 Jul 2000, Dinesh Nadarajah wrote:

 I am trying to compile a simple X application but I
 keep getting the folloeing error:
 
 gcc -g -o testapp test1.c -lX11
 
 /usr/bin/ld: cannot find -lX11
 collect2: ld returned 1 exit status
 
 Any suggestions? What are the Xlib libraries called
 under Linux.  Thanks.
 
 -D
 

xlib6g installs its libraries under /usr/X11R6/lib/ (try dpkg --largemem
-L xlib6g) and are trying to have names compatible with all other
distributions. I think the problem is that xlib6g does not make
/usr/lib/X11 to be a symlink to /usr/lib/X11R6 where ld likes to look for
the libraries. Either make the symlink, or give ld (gcc will pass
appropriate arguments to ld) a -L/usr/X11R6/lib switch.

This is for now,
Pavel M. Penev




Re: Help compiling Xlib

2000-07-17 Thread Dinesh Nadarajah
I tried all sorts of combinations but don't seem to be
able to get it going. What is the name of the Xlib
library files? Here are the things I tried. Any other
advice?

Thanks.



gcc test1.c -lX11
test1.c: In function `main':
test1.c:18: warning: return type of `main' is not
`int'
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status

gcc test1.c -lxlib6g
test1.c: In function `main':
test1.c:18: warning: return type of `main' is not
`int'
/usr/bin/ld: cannot find -lxlib6g
collect2: ld returned 1 exit status

gcc test1.c -l/usr/X11R6/lib
test1.c: In function `main':
test1.c:18: warning: return type of `main' is not
`int'
/usr/bin/ld: cannot find -l/usr/X11R6/lib
collect2: ld returned 1 exit status

gcc test1.c -l/usr/X11R6/lib/libX11.so.6.1
test1.c: In function `main':
test1.c:18: warning: return type of `main' is not
`int'
/usr/bin/ld: cannot find
-l/usr/X11R6/lib/libX11.so.6.1
collect2: ld returned 1 exit status

gcc test1.c -llibX11  
test1.c: In function `main':
test1.c:18: warning: return type of `main' is not
`int'
/usr/bin/ld: cannot find -llibX11
collect2: ld returned 1 exit status

gcc test1.c -llibX11.so.6.1
test1.c: In function `main':
test1.c:18: warning: return type of `main' is not
`int'
/usr/bin/ld: cannot find -llibX11.so.6.1
collect2: ld returned 1 exit sta


--- Pavel M. Penev [EMAIL PROTECTED]
wrote:
 
 
 On Mon, 17 Jul 2000, Dinesh Nadarajah wrote:
 
  I am trying to compile a simple X application but
 I
  keep getting the folloeing error:
  
  gcc -g -o testapp test1.c -lX11
  
  /usr/bin/ld: cannot find -lX11
  collect2: ld returned 1 exit status
  
  Any suggestions? What are the Xlib libraries
 called
  under Linux.  Thanks.
  
  -D
  
 
 xlib6g installs its libraries under /usr/X11R6/lib/
 (try dpkg --largemem
 -L xlib6g) and are trying to have names compatible
 with all other
 distributions. I think the problem is that xlib6g
 does not make
 /usr/lib/X11 to be a symlink to /usr/lib/X11R6 where
 ld likes to look for
 the libraries. Either make the symlink, or give ld
 (gcc will pass
 appropriate arguments to ld) a -L/usr/X11R6/lib
 switch.
 
 This is for now,
 Pavel M. Penev
 
 
 
 -- 
 Unsubscribe?  mail -s unsubscribe
 [EMAIL PROTECTED]  /dev/null
 


__
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.com/



RE: Help compiling Xlib

2000-07-17 Thread Lehel Bernadt

On 17-Jul-2000 Dinesh Nadarajah wrote:
 I am trying to compile a simple X application but I
 keep getting the folloeing error:
 
 gcc -g -o testapp test1.c -lX11
 
 /usr/bin/ld: cannot find -lX11
 collect2: ld returned 1 exit status
 
 Any suggestions? What are the Xlib libraries called
 under Linux.  Thanks.


You'll need xlib6g-dev.