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


>-----Original Message-----
>From: Alexandre Oliva [mailto:aoliva@redhat.com]
>Sent: 15 March 2001 22:09

>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?

  Or is this perhaps to do with the order in which the link libs are
listed?  Maybe -lstack should come after -lqt ?  And perhaps the same for
-lmem?

      DaveK
-- 
 All your base are belong to us!


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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