delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/20/04:11:10

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <029f01c2d8c0$0c2f1d90$526286d9@webdev>
From: "Elfyn McBratney" <elfyn-cygwin AT exposure DOT org DOT uk>
To: "cygwin" <cygwin AT cygwin DOT com>, "Manu Anand" <ManuA AT mascotsystems DOT com>
References: <5575473D4532D411BE4C009027E8C8380AB81507 AT masblrexc02 DOT mascotsystems DOT com>
Subject: Re: g++ linking probs
Date: Thu, 20 Feb 2003 09:11:26 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

> Hi
> I have libcppunit.la and libcppunit.a
> That'll be static,right??
>
> How do I link it then?
> -Manu
>

Like so

g++ -W -Wall -ansi -pedantic -I/usr/local/include -L /usr/local/lib
libcppunit.a prog.cxx

But it's static so it won't make any difference. Sorry I'm all out!

> > > /home/Administrator/work/cxx/tests/Employee.cpp:72: undefined
reference
> > to
> > > `CppUnit::TestCase::TestCase[not-in-charge](std::basic_string<char,
> > > std::char_traits<char>, std::allocator<char> >)'
> > >
> > >
> >
/cygdrive/c/TEMP/ccL6jx4L.o(.text$_ZN7CppUnit16TestSuiteBuilderI12Employee
> > Te
> > >
> >
stE7addTestEPNS_4TestE+0x1c):/home/Administrator/work/cxx/tests/Employee.c
> > pp
> > > :70: undefined reference to
> > `CppUnit::TestSuite::addTest(CppUnit::Test*)'
> > >
> > > This is thrown for every method call.
> >
> >
> > Did you build libcppunit as a static lib or a shared (.dll) lib? It the
> > latter then try linking eith the static lib (adding libcppunit.a on the
> > end).


Regards,

Elfyn McBratney
elfyn AT exposure DOT org DOT uk
www.exposure.org.uk



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019