Boost logo

Boost Users :

From: Joel de Guzman (joel_at_[hidden])
Date: 2004-06-24 21:37:00


Mark Storer wrote:

Hi Mark,

No chance of switching to 7.1? :-)

> I'm getting several compiler errors when trying to use the Spirit library.
>
> When compiling one of the samples from the v1.6 documentation, I get a linker error:
>
> SpiritTest.obj : fatal error LNK1179: invalid or corrupt file: duplicate comdat

[...]

This sometimes happen especially if you have complex expressions which generates
complex types. Often times, the problem is only seen at debug mode where the
functions are not fully inlined by the compiler. The solution is to break down
your expressions (sepecially subrules) into smaller chunks.

> c:\sdks\boost-1.30.2\boost\spirit\utility\impl\chset\basic_chset.ipp(32) : error C2955: 'arg' : use of class template requires template argument list
> c:\sdks\boost-1.30.2\boost\bind\arg.hpp(26) : see declaration of 'arg'

[...]

> The boost/bind include is in the core/composite/actions. Trying to mess with the order of inclusion seems Fraught With Peril. The basic_chset template is in "utility", and everything in "utility" depends on various bits and pieces of "core". basic_chset is derived from unary, which is defined in core/composite. A Gordian knot... and me without a sword.

This has been fixed in the current CVS but unfortunately didn't make it into
the Spirit 1.6 branch yet. Hopefully, a maintenance upgrade (v1.6.1) will be
provided. You can simply change all occurrances of "arg" to "arg_" to fix
the problem. Alternatively, you can update from the Spirit CVS, branch
BRANCH_1_6.

This is again a VC++ bug.

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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