bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: undefined reference getopt_long


From: Glenn Morris
Subject: Re: undefined reference getopt_long
Date: Sat, 01 Sep 2007 16:21:17 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

"Daniel C. Bastos" wrote:

> gcc -I/usr/X11R6/include -I/usr/local/include -L/usr/local/lib    
> -DHAVE_CONFIG_H    -I. -I../src -I/home/dbastos/tmp/emacs/lib-src 
> -I/home/dbastos/tmp/emacs/lib-src/../src -Wl,-znocombreloc -L/usr/X11R6/lib 
> -I/usr/X11R6/include -I/usr/local/include -L/usr/local/lib -g -O2 
> -DEMACS_NAME="\"GNU Emacs"\" -DVERSION="\"22.1.50\"" 
> /home/dbastos/tmp/emacs/lib-src/etags.c getopt.o getopt1.o regex.o -lutil    
> -lc -o etags
> /tmp/cc86z2lb.o: In function `main':
> /home/dbastos/tmp/emacs/lib-src/etags.c(.text+0x71f): undefined reference to 
> `getopt_long'


I don't know much about this, so I might not help much. lib-src/
contains some getopt* files that ought to provide a definition of
getopt_long if your system does not have one. Can you figure out why
they are not working for you?

getopt1.c contains a definition of getopt_long, and your command-line
above shows getopt1.o being included in the compile command.

Did the file getopt.h in your lib-src directory get generated? Is
etags.c finding it when it gets compiled?

What are the values of GETOPT_H and GETOPTDEPS in your
lib-src/Makefile?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]