Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost-users Digest, Vol 2362, Issue 3
From: Edward Rankin (erankin_at_[hidden])
Date: 2010-05-19 21:21:15


On Tue, May 18, 2010 at 2:39 AM, <boost-users-request_at_[hidden]>wrote:

>
>
> Edward Rankin wrote:
> > On Mon, May 17, 2010 at 6:53 PM, <boost-users-request_at_[hidden]
> > <mailto:boost-users-request_at_[hidden]>> wrote:
> >
> >
> > Hi,
> > I have a large project and for what ever reason if I add
> xpressive.hpp
> > in my precompiled header, it completly kills intelligence. So I
> > figured
> > I'd move the stuff I want to use off to a lib. Works fine in debug
> but
> > if I build the release, this lib tries to link in the Microsoft
> > debug libs.
> >
> > In my project:
> > 1>mfcs90.lib(nolib.obj) : warning LNK4098: defaultlib 'mfc90d.lib'
> > conflicts with use of other libs; use /NODEFAULTLIB:library
> > 1>mfcs90.lib(nolib.obj) : warning LNK4098: defaultlib 'mfcs90d.lib'
> > conflicts with use of other libs; use /NODEFAULTLIB:library
> > and just this one in the test solution:
> > 1>msvcrt.lib(cinitexe.obj) : warning LNK4098: defaultlib
> 'msvcrtd.lib'
> > conflicts with use of other libs; use /NODEFAULTLIB:library
>

I just realised that your issue might have nothing to do with boost. The
warning messages above mention mfcs90.lib which boost definitely doesn't
use. Something strange is going on, but it is unlikely to have anything to
do with boost.

> >
> > I have been able to recreate the problem in a small solution that
> > should
> > not dependent on my directories other than setting the boost path:
> >
> > <http://lakeweb.net/downloads/RaVpath.zip>
> > (20k) vc 2008 (9.0) boost 1_42
> >
> > And I don't know, this may have nothing to do with boost, but I have
> > other dlls and libs without this problem. It is coming from
> > 'boost::filesystem' as best as I can determine.
> >
> > And maybe someone has seen this before and knows off the top of
> > their head.
> >
> > Thanks, Dan.
> >
> >
> > What's happening here is that the libs you built were built against
> > the microsoft debug libs. You will need to build a separate set of
> > libs which were built against the microsoft release libs. This means
> > when you are compiling your actual program in release mode, you will
> > need to point the linker to the new set of libs you built.
>
> Hi Edward,
> Thanks. I do think I have all this in place. This may be my problem and
> boost is the wrong place to ask. But I have:
>
> TestCon.cpp
> #ifdef _DEBUG
> #pragma comment( lib,
> "C:\\cpp\\ReserveAnalyst_9\\RaVpath\\static_libd\\RaVPathd.lib" )
> #else
> #pragma comment( lib,
> "C:\\cpp\\ReserveAnalyst_9\\RaVpath\\static_lib\\RaVPath.lib" )
> #endif
>
> and in the static_lib 'should' be only release dependent. I see here I
> forgot to set the path relative for the test case. Should have been:
> "..\\static_lib\\RaVPath.lib"
>
> I'm not sure how VS chooses libs but I have checked the .vcproj directly
> and only NDEBUG is used for static_lib. And I don't have this trouble
> with any other lib or dll I build.
>

You seem to be doing everything right. You might want to try from scratch
building this lib and see this error still occurs. It could be some obscure
setting we have overlooked.

> And thanks OvermindDL1,
> I see I would qualify for the $99 license. I'll give this strong
> consideration. (Visual Assist X)
>

I use this at work too, and it is pretty cool tool.

>
> Best, Dan.
>
>
Regards,

Edward



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