Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::function and cross dll call issue
From: ariasgore_at_[hidden]
Date: 2012-05-06 03:42:38


Hello,

some of those points can be confirmed since I integrated boost into our environment:

For 1: We do only have one boost version and both binaries do not use anything compiled from boost. No special flags have been set for the pre processor.

For 2: We do never mix debug runtime libraries and all libs do use the /MDd flag so that the dlls share the same runtime context.
But I will check that with dependency walker again.

Both binaries are build on the same machine by the same compiler. However the noted fact that the assembler code is different somehow bothers me since I cannot confirm that the binaries itself are build with the same compiler settings.
Anyway since I am in debug I do expect no changes there since we usually build debug without any optimization.

Thanks
Sam

> ----- Original Message -----
> > From: "ariasgore_at_[hidden]" <ariasgore_at_[hidden]>
> > To: boost-users_at_[hidden]
> > Cc:
> > Sent: Friday, May 4, 2012 8:55 PM
> > Subject: [Boost-users] boost::function and cross dll call issue
> >
> > Hello,
> > I have a weird access violation when using boost::function which is
> passed from
> > one DLL to another.
> > At work we use an engine that loads libraries at runtime.
>
>
> You MUST check following basic points:
>
> 1. Make sure that they use **exactly same** version of Boost with same
> flags (debug/release etc)
>
> 2. Do all the DLLs use exactly the same runtime, such that something
> allocated
>    in one DLL and deallocated in other calls exactly the same functions.
>
>    Best try to check it with depends.exe program and check if the use
>    and load same MSVCxxx.DLL
>
>    Including same debug/release and exact version.
>
> 2. Make sure that they both use Dynamic Runtime linking (i.e. do not link
>    with MSVC runtime statically)
>
> Just hints to debug
>
>
>  
> Artyom Beilis
> --------------
> CppCMS - C++ Web Framework:   http://cppcms.com/
> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a

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