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]

problem linking lib c with gcc


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



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