This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: problem linking lib c with gcc
- To: Sergio Queiroz <sergio at consiste dot dimap dot ufrn dot br>
- Subject: Re: problem linking lib c with gcc
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 15 Mar 2001 19:08:39 -0300
- Cc: gcc-help at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <Pine.LNX.4.10.10103150934380.990-100000@punau.dimap.ufrn.br>
On Mar 15, 2001, Sergio Queiroz <sergio@consiste.dimap.ufrn.br> wrote:
> gcc -o menu main.o menu.o -L. -lstack -lmem -lqt
> menu.o:In function `Menu::Menu(QWidget *, char const *)':
> menu.o(.text+0x31): undefined reference to `stack_New(unsigned int, unsigned int)'
> menu.o(.text+0x45): undefined reference to `stack_Dispose(stackCell *)'
So, where is it that these functions should be defined? Perhaps they
should have been declared with `extern "C"', or you failed to #include
some header file?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me