problem linking lib c with gcc

Alexandre Oliva aoliva@redhat.com
Thu Mar 15 14:08:00 GMT 2001


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



More information about the Gcc-help mailing list