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 "?do_parse@?$parse_subrule@V?$match@Unil_t@spirit@boost@@@spirit@boost@@U?$subrules_scanner@V?$scanner@PBDU?$scanner_policies@U?$skipper_iteration_policy@Uiteration_policy@spirit@boost@@@spirit@boost@@Umatch_policy@23@Uaction_policy@23@@spirit@boos67ac75e0"
LNK1179 suggested that the /H _compiler_ option might be involved. It (supposedly) controls how long a symbol is allowed to be when the compiler is generating symbol names. I've tried several different variations on the /H option, /H512, /H1024, etc. They all give the same error message, and the symbol "?do_parse@..." doesn't get any longer (or shorter for that matter).
I also get a number compiler errors when I #include
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
participants (2)
-
Joel de Guzman
-
Mark Storer