Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2005-04-27 04:43:40


>I found the main problem, I had edited the wrong boost/config/user.hpp
>file.
> When I set BOOST_FILESYSTEM_DYN_LINK in the correct user.hpp file I get
> this
> error.
>
> c:\Boost\include\boost-1_31\boost\config\auto_link.hpp(269): fatal error
> C1189: #error : "Mixing a dll boost library with a static runtime is a
> really bad idea..."
>
> #if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)
> # define BOOST_LIB_PREFIX
> #elif defined(BOOST_DYN_LINK)
> # error "Mixing a dll boost library with a static runtime is a really bad
> idea..."
> #else
> # define BOOST_LIB_PREFIX "lib"
> #endif
>
> So wher am I supposed to set the _DLL symbol or do I need to disable
> auto_link. If so how?

The message tells you what you've done wrong: you can not use a dll that
passes C++ objects between itself and your application unless you are also
using a dll runtime library. If you do manage to do this your code will
very likely crash and burn at runtime (due to recourses being allocated and
freed by differing C++ runtimes). If you switch your code generation
options (in the VC++ IDE) to use a dll runtime then the error message will
go away.

John.


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