Boost logo

Boost :

From: Benoit Sigoure (tsuna_at_[hidden])
Date: 2007-11-15 14:43:49


Hi list,
I wrote a set of M4 macros to use the Boost libraries with GNU
Autoconf. I did not find any macro that was reliable enough. If
you're interested, you can have a look at the code:
http://repo.or.cz/w/boost.m4.git
The code is currently under GPLv3+ but if Boost wants to ship this
with Boost itself, and if doing this requires license adaptations,
I'm inclined to use another Free license.

The macros are pretty simple to use, I've tested them on MacOSX (PPC/
Intel), GNU/Linux (various distros, including Debian), Windows (XP,
with MinGW, Cygwin and MSVC). The only problem I ran into is with
Boost.Thread and MSVC:

configure:23603: c:/vcxx8/VC/bin/cl.exe /errorReport:none /nologo /
EHsc /Feconftest.exe /IC:/cygwin/usr/local/msvc/include conftest.cpp /
link /EHsc /out:conftest.exe /LIBPATH:C:/cygwin/usr/local/msvc/lib C:/
cygwin/usr/local/msvc/lib/libboost_thread-vc80-mt-1_34_1.lib
conftest.cpp
LINK : warning LNK4044: unrecognized option '/EHsc'; ignored
MSVCRT.lib(MSVCR80.dll) : error LNK2005: "public: __thiscall
std::exception::exception(char const * const &)" (??
0exception_at_std@@QAE_at_ABQBD@Z) already defined in LIBCMT.lib(stdexcpt.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: "public: virtual __thiscall
std::exception::~exception(void)" (??1exception_at_std@@UAE_at_XZ) already
defined in LIBCMT.lib(stdexcpt.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: "public: __thiscall
std::exception::exception(void)" (??0exception_at_std@@QAE_at_XZ) already
defined in LIBCMT.lib(stdexcpt.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: "public: __thiscall
std::exception::exception(class std::exception const &)" (??
0exception_at_std@@QAE_at_ABV01@@Z) already defined in LIBCMT.lib
(stdexcpt.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __invalid_parameter_noinfo
already defined in LIBCMT.lib(invarg.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall
type_info::type_info(class type_info const &)" (??
0type_info@@AAE_at_ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info &
__thiscall type_info::operator=(class type_info const &)" (??
4type_info@@AAEAAV0_at_ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of
other libs; use /NODEFAULTLIB:library
conftest.exe : fatal error LNK1169: one or more multiply defined
symbols found
configure:23609: $? = 2
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "Urbi Kernel"
| #define PACKAGE_TARNAME "kernel"
| #define PACKAGE_VERSION "1.5"
| #define PACKAGE_STRING "Urbi Kernel 1.5"
| #define PACKAGE_BUGREPORT "kernel-bugs_at_[hidden]"
| #define PACKAGE_COPYRIGHT_HOLDER "Gostai SAS"
| #define PACKAGE_COPYRIGHT_YEARS "2005-2007"
| #define PACKAGE "kernel"
| #define VERSION "1.5"
| #define URBI_ENV_ENGINE 1
| #define WIN32
| #define _CRT_SECURE_NO_DEPRECATE
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_WINDOWS_H 1
| #define HAVE_BOOST_THREAD_HPP 1
| /* end confdefs.h. */
| #include <boost/thread.hpp>
| int
| main ()
| {
| boost::thread t; boost::mutex m;
| ;
| return 0;
| }

I can get the build to succeed if I use /MT, but I'd like to use /MD,
not /MT. Any idea?

Cheers,

-- 
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk