This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problem linking lib c with gcc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]