Re: Bug: Cannot open include
Michael Powell <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAMEoF_E6XLrHfBM4fmNxoj-ZR2ThR_E6xjYCP_hOtjzFUUWqeA@mail.gmail.com> |
On Thu, Nov 23, 2017 at 12:51 PM, Michael Powell <[email protected]> wrote: > On Thu, Nov 23, 2017 at 12:12 PM, Michael Powell <[email protected]> wrote: >> It's starting to look like more of a B2 issue at this point getting >> started with Spirit/X3. I am also receiving a crap ton of linker >> errors looking for "ucrtd.lib". >> >> There is an undocumented B2 include option: >> >> include="${B2_INCLUDE_PATH}" >> >> Where B2_INCLUDE_PATH is my CMake variable identifying my Windows Platform SDK. >> >> What I need to know is the corresponding library option. >> >> And working from there; i.e. for any compiler definitions I may need or want. > > I am trying to set the Microsoft Linker path(s) via CMake, which is > kind of awkward since it has to pass through the B2 options. > > So far, this is the best I can come up with. Perhaps there is a better way. > > set (PLATFORM_SDK_LIB_PATH "C:/Program Files (x86)/Windows > Kits/10/Lib/10.0.10240.0/ucrt/x64" CACHE STRING "Specify the Platform > SDK library path") > > set (B2_LIBPATH "${PLATFORM_SDK_LIB_PATH}") > > ${B2_EXECUTABLE} ... linkflags="/LIBPATH:\"${B2_LIBPATH}\"" ... > > Notwithstanding specifics like SDK version, architecture, address model, etc. > > This cannot be the way to communicate these options via CMake command line. > > The log indicates as much: > > ...updated 1 target... > don't know how to make <e>Files > don't know how to make <e>(x86)/Windows > don't know how to make <e>Kits/10/Lib/10.0.10240.0/ucrt/x64 > ...found 3 targets... > ...can't find 3 targets... > > I just want a way to tell B2 what the toolchain linker options, > specifically the linker directory(ies), should be. I found a Code Project project which showed how to format the command properly. Basically, enclosed ticks ('), instead of escaped quotes. https://www.codeproject.com/Articles/882581/Building-and-configuring-boost-in-Visual-Studio-MS Seems to be working, from the log: Component configuration: - atomic : building - chrono : building - container : building - context : building - coroutine : building - date_time : building - exception : building - fiber : building - filesystem : building - graph : building - graph_parallel : building - iostreams : building - locale : building - log : building - math : building - metaparse : building - mpi : building - program_options : building - python : building - random : building - regex : building - serialization : building - signals : building - stacktrace : building - system : building - test : building - thread : building - timer : building - type_erasure : building - wave : building ...patience... ...patience... ...patience... ... It's much better looking than it was before, anyway. > Am I correct in understanding Jamfiles can do this? I am unfamiliar > with Jamfiles per se. Does anyone have a Jamfile example? > >> Cheers, >> >> Michael Powell >> >> >> >> On Thu, Nov 23, 2017 at 11:53 AM, Michael Powell <[email protected]> wrote: >>> On Thu, Nov 23, 2017 at 11:42 AM, Michael Powell <[email protected]> wrote: >>>> On Thu, Nov 23, 2017 at 11:39 AM, Michael Powell <[email protected]> wrote: >>>>> Hello, >>>>> >>>>> Straight out of the gate, getting this error trying to include: >>>>> >>>>> #include <boost/tti/has_type.hpp> >>>>> >>>>> 4>/path/to/boost/spirit/home/x3/support/traits/container_traits.hpp(16): >>>>> fatal error C1083: Cannot open include file: 'boost/tti/has_type.hpp': >>>>> No such file or directory >>>> >>>> Preliminary analysis suggests, there is no <boost/tti/...> path. There >>>> is, however, a <boost/mpl/aux_/has_type.hpp>. >>> >>> There are at least a couple such includes: >>> >>> #include <boost/tti/has_type.hpp> >>> #include <boost/tti/has_member_function.hpp> >>> >>> There is also no "has_member_function.hpp" whatsoever. >>> >>> I think I see what's going on and am open to suggestions. I am >>> including from my installed binaries and includes. >>> >>> But this does not include any TTI, that I can tell, whereas the >>> original source does. So perhaps something fell over during my build. >>> >>> For the most part, my build settings are "vanilla", taking Boost >>> "as-is", unless I otherwise learn of a setting, Boost compiler >>> definition, etc, that I want. >>> >>> I attached my build log. There were in fact some failures for lack of >>> LZMA, among other things, failure to build Locale, etc. Unrelated, I >>> should think, from TTI, per se. >>> >>>>> My rule is fairly straightforward, at least as far as I can tell: >>>>> >>>>> #include <boost/spirit/home/x3.hpp> >>>>> >>>>> // TODO: TBD: we may refine this later on... >>>>> using namespace boost::spirit; >>>>> using namespace boost::spirit::x3; >>>>> >>>>> x3::rule<class Port, std::uint16_t> const Port = "Port"; >>>>> >>>>> auto const Port_def = digit >>>>> | (char_('1', '9') >> digit[repeat(1, 3)]) >>>>> | (char_('1', '5') >> digit[repeat(4)]) >>>>> | (char_('6') >> char_('0', '4') >> digit[repeat(3)]) >>>>> | ("65" >> char_('0', '4') >> digit[repeat(2)]) >>>>> | ("655" >> char_('0', '2') >> digit) >>>>> | ("6553" >> char_('0', '5')) >>>>> ; >>>>> >>>>> BOOST_SPIRIT_DEFINE(Port); >>>>> >>>>> I can patch locally, possibly also submit a PR. >>>>> >>>>> Best, >>>>> >>>>> Michael Powell ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot