Re: gcc & X: reprise
In message <[🔎] m0wZPPt-00004EC@paso>, Obi writes:
>
> > I could guess, but there are quite a few possibilities. The error message
> > you recieve during compilation would be helpful. What does it say?
> >
> Well, after untar the program I got an Imake file so I do a xmkmf -a and I ge
->t
> this:
>
> imake -DUseInstalled -I/usr/X11R6/lib/X11/config
> make Makefiles
> make: Nothing to be done for `Makefiles'.
> make includes
> make: Nothing to be done for `includes'.
> make depend
> gccmakedep -- -I/usr/X11R6/include -Dlinux -D__i386__ -D_POSIX_SOURCE
> -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE -DFUNCPROTO=15 -DNARROWPROTO --
> bdfresize.c charresize.c
>
> after I try with make and I get this:
>
> gcc -O2 -fno-strength-reduce -m486 -I/usr/X11R6/include -Dlinux
> -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE
> -DFUNCPROTO=15 -DNARROWPROTO -c bdfresize.c -o bdfresize.o
> gcc -O2 -fno-strength-reduce -m486 -I/usr/X11R6/include -Dlinux
> -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE
> -DFUNCPROTO=15 -DNARROWPROTO -c charresize.c -o charresize.o
> rm -f bdfresize
> gcc -o bdfresize -O2 -fno-strength-reduce -m486 -L/usr/X11R6/lib
> bdfresize.o charresize.o
> charresize.o: In function `countup_score':
> charresize.o(.text+0x779): undefined reference to `MIN'
> charresize.o(.text+0x786): undefined reference to `MAX'
> charresize.o(.text+0x792): undefined reference to `MIN'
> charresize.o(.text+0x79e): undefined reference to `MAX'
I have not used thes macros for a while so I dont know about recent
C standards but MIN and MAX used to be standard preprocessor macros.
You can define them like this:
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MAX(x, y) ((x) > (y) ? (x) : (y))
Add this at top of charresize.c (or cc). If this helps it migtht be good
to track down the REAL problem (this is more like a sympthom).
HTH /Lars
> make: *** [bdfresize] Error 1
>
> I still believe that in the last command (gcc -o ...) some libraries (-l..)
> are missing ...
>
>
> --
> Graziano Obertelli - aspirante palombaro
>
> E-Mail: graziano@ucsd.edu
> Lab's phone: (619) 534 9669
>
>
> --
> TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
> debian-user-request@lists.debian.org .
> Trouble? e-mail to templin@bucknell.edu .
>
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: