views:

14

answers:

1

I can't get it to work with visual c++ 2005 and boost 1.43

this simple source code :

#include <boost/date_time.hpp>

int main( int argc, char** argv )
{
    boost::gregorian::date d();
}

gives a link-time error :

error LNK2019: unresolved external symbol "class boost::gregorian::date __cdecl d(void)" (?d@@YA?AVdate@gregorian@boost@@XZ)

I've been using other compiled boost libraries like filesystem or thread without problems...

I compiled it using

bjam -a
+1  A: 

You're declaring a function prototype, not creating a boost::gregorian::date variable. Take off the parentheses.

boost::gregorian::date d;
Mark Ransom
ouch - I go hide somewhere :D - thanks btw
foke