|
Boost Users : |
From: Dinesh Pillay (dpillay_at_[hidden])
Date: 2005-06-10 00:02:52
Hi,
It still does not link, even when I tried the two commands you posted.
I'm at a loss here, I just don't understand the nature of the error.
Regards,
Dinesh.
Message: 3
Date: Wed, 8 Jun 2005 18:08:32 -0400
From: Caleb Epstein <caleb.epstein_at_[hidden]>
Subject: Re: [Boost-users] Error Linking A Simple Application using
Boost.Any
To: boost-users_at_[hidden]
Message-ID: <989aceac050608150830caa3e7_at_[hidden]>
Content-Type: text/plain; charset=ISO-8859-1
On 6/7/05, Dinesh Pillay <dpillay_at_[hidden]> wrote:
> >g++ -IC:\Boost\include\boost-1_32 -pedantic -s -O3 -fno-exceptions -c
> boost_trial.cpp -o boost_trial.o
>
> But when I try to link the file using:
> g++ -IC:\Boost\include\boost-1_32 boost_trial.cpp -o boost_trial.exe
>
> I get the following errors:
>
> /mingw/lib/libstdc++.a(eh_personality.o)(.data$_ZTISt9exception[typeinfo
> for std::exception]+0x0): multiple definition of `typeinfo for
> std::exception'
> C:\DOCUME~1\dpilla\LOCALS~1\Temp/ccoBaaaa.o(.rdata$_ZTISt9exception[typeinfo
> for std::exception]+0x0):boost_trial.cpp: first defined here
> /mingw/lib/libstdc++.a(eh_personality.o)(.text$_ZTSSt9exception[typeinfo
> name for std::exception]+0x0): multiple definition of `typeinfo name
> for std::exception'
> C:\DOCUME~1\dpilla\LOCALS~1\Temp/ccoBaaaa.o(.rdata$_ZTSSt9exception[typeinfo
> name for std::exception]+0x0):boost_trial.cpp: first defined here
> /mingw/lib/libstdc++.a(functexcept.o)(.data$_ZTISt8bad_cast[typeinfo
> for std::bad_cast]+0x0): multiple definition of `typeinfo for
> std::bad_cast'
> C:\DOCUME~1\dpilla\LOCALS~1\Temp/ccoBaaaa.o(.rdata$_ZTISt8bad_cast[typeinfo
> for std::bad_cast]+0x0):boost_trial.cpp: first defined here
> /mingw/lib/libstdc++.a(functexcept.o)(.text$_ZTSSt8bad_cast[typeinfo
> name for std::bad_cast]+0x0): multiple definition of `typeinfo name
> for std::bad_cast'
> C:\DOCUME~1\dpilla\LOCALS~1\Temp/ccoBaaaa.o(.rdata$_ZTSSt8bad_cast[typeinfo
> name for std::bad_cast]+0x0):boost_trial.cpp: first defined here
> collect2: ld returned 1 exit status
>
> I have no idea why this is happening! What am I doing wrong? Somebody
> please tell me the right way to link the file.
>
>> I suspect the problem is you have disabled exceptions
>> (-fno-exceptions). Are you doing this for any particular reason?
>> Also, why are you stripping your object files (-s in the compile
>> line)? Hopefully gcc is ignoring this, but this may also be the cause
>> of your grief.
>> g++ -Ic:/boost/include/boost-1_32 -O3 -c boost_trial.cpp
>> g++ -s -o boost_trial.exe boost_trial.o
>> --
>> Caleb Epstein
>> caleb dot epstein at gmail dot com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net