problem linking lib c with gcc
Sergio Queiroz
sergio@consiste.dimap.ufrn.br
Thu Mar 15 10:32:00 GMT 2001
Hi,
I am involved in a project where I should add a graphical interface for
a library written in C, and I intend to use Qt, written in C++, to develop
the graphical interface. I have some problems with linkage, using either
g++ or gcc.
I reproduced the problem on a trivial example that links both the Qt
library (C++) and a toy stack library (C).
The log is:
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 *)'
collect2: ld returned 1 exit status
My gcc version is 2.95.2
More information about the Gcc-help
mailing list