[CXX-1779] Mongocxx driver build on windows with mingw_vc90 Created: 28/May/19  Updated: 08/Feb/23

Status: Backlog
Project: C++ Driver
Component/s: API
Affects Version/s: 3.4.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Zubair Akhtar Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: post-5.0, size-small
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: Windows 10
Compiler: GCC 7.3 VC90

MongoC Version: Latest


Issue Links:
Related
related to CXX-2001 Undefined reference to bsoncxx when c... Backlog
Epic Link: CXX-2634

 Description   

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.

 


Generated at Wed Feb 07 22:03:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.