Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1779

Mongocxx driver build on windows with mingw_vc90

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.0
    • Component/s: API
    • Environment:
      OS: Windows 10
      Compiler: GCC 7.3 VC90

      MongoC Version: Latest

      I have built mongocxx and bsoncxx libs (both shared and static) for linux using GCC (libstdc++6), windows using VS 2015 (MSVC 140) and windows using MinGW (GCC 7.3 VC90). GCC linux and VS 2015 builds compile and run flawlessly whereas the MinGW one has been giving me trouble. The following lines of code produce undefined reference errors:

       

      CODE:

      -------

      for (bsoncxx::document::view doc: coll.find({}))

      { bsoncxx::document::element iso_mic_code = *doc.find("ISO_MIC_CODE"); bsoncxx::document::element holiday_date = *doc.find("HOLIDAY_DATE"); bsoncxx::document::element holiday_event_type_code = *doc.find("HOLIDAY_EVENT_TYPE_CODE"); }

       

      ERRORS:

      ---------

      I get the following error on all 3 lines highlighted above during linking

      undefined reference to `bsoncxx::v_noabi::document::view::find(core::v1::basic_string_view<char, std::char_traits<char> >) const'

       

      I use MNMLSTC/core polyfill implementation for linux and boost polyfill for both windows configurations. I have meticulously checked that there are no missing dependencies. Actually both gcc builds (windows and linux) share the same build system (WAF). I have run out of ideas at this point and would appreciate any help.

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            zakhtarch87 Zubair Akhtar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: