Boost logo

Boost Users :

Subject: Re: [Boost-users] need help on compile error about gregorian and regex
From: Lars Viklund (zao_at_[hidden])
Date: 2011-08-08 03:35:27


On Sun, Aug 07, 2011 at 08:32:26PM -0700, Eric Lin wrote:
>   when I compile a program(some example code from c++ book)
> it contain
> #include <boost/date_time/gregorian/gregorian.hpp>
> #include <boost/regex.hpp>
>
> and I got a lot compile error related about it on my g++ with boost 1.46.1 installed
>
> these code is claimed worked on msvc++7.1 on window xp

Some Boost libraries have a compiled component, while some are
header-only. The ones that are of the former kind you need to link
against.

When you use Boost under Visual C++, it has an "auto-link" feature, in
which it uses compiler pragmas to automatically link against the
compiled library files that a Boost library might need.

Under GCC and other toolchains, there's no such thing and it's up to you
to link against the libraries needed.

-- 
Lars Viklund | zao_at_[hidden]

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