[CDRIVER-2247] bson_iter_decimal128 could not be located in libbson-1.0.dll Created: 18/Aug/17  Updated: 27/Oct/23  Resolved: 18/Aug/17

Status: Closed
Project: C Driver
Component/s: libbson
Affects Version/s: 1.7.0
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Nathan Sevuganchetty Assignee: Hannes Magnusson
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 64bit


Attachments: File MongoCPP.7z    

 Description   

I was able to compile mongoc and cxx libraries. In my test program when I load the dll i get a procedure entry point bson_iter_decimal128 error.

All libraries and my exe are 64 bit applications.



 Comments   
Comment by Hannes Magnusson [ 18/Aug/17 ]

Thank you for letting us know.
I was scratching my head over this one, it didn't make sense

Comment by Nathan Sevuganchetty [ 18/Aug/17 ]

Please close the JIRA. Both mongoc and mongocxx are working now.

REASON
I had Embarcadero C++ builder installed and it had a version of all these DLLs in the path. I changed my batch file that starts the solution slightly to get around this problem.

MongoCpp.bat

  1. FROM
    SET ADDITIONAL_PATH_DIRECTORIES=C:/p/tools/MongoDB/mongo-c-driver-1.7.0/build/bin/bin;C:/p/tools/MongoDB/mongo-cxx-driver-r3.1.2/src/mongocxx/Debug;C:/p/tools/MongoDB/mongo-cxx-driver-r3.1.2/src/bsoncxx/Debug
    SET PATH=%PATH%;%ADDITIONAL_PATH_DIRECTORIES%
    #TO
    SET ADDITIONAL_PATH_DIRECTORIES=C:/p/tools/MongoDB/mongo-c-driver-1.7.0/build/bin/bin;C:/p/tools/MongoDB/mongo-cxx-driver-r3.1.2/src/mongocxx/Debug;C:/p/tools/MongoDB/mongo-cxx-driver-r3.1.2/src/bsoncxx/Debug
    SET PATH=%ADDITIONAL_PATH_DIRECTORIES%;%PATH%

This fixed the problem.

Thanks
Nathan

Comment by Nathan Sevuganchetty [ 18/Aug/17 ]

I use Visual Studio 2015 on Windows 7.
mongo-c-driver - 1.7.0
mongo-cxx-driver- r3.1.2

//libbson
cd mongo-c-driver-1.7.0\src\libbson
cmake -G "Visual Studio 14 2015 Win64" "-DCMAKE_INSTALL_PREFIX=C:\p\tools\MongoDB\mongo-c-driver-1.7.0\build\bin" "-DCMAKE_BUILD_TYPE=Release"

//mongo c driver
cmake -G "Visual Studio 14 2015 Win64" "-DENABLE_SSL=WINDOWS" "-DENABLE_SASL=SSPI" "-DCMAKE_INSTALL_PREFIX=C:\p\tools\MongoDB\mongo-c-driver-1.7.0\build\bin" "-DCMAKE_PREFIX_PATH=C:\p\tools\MongoDB\mongo-c-driver-1.7.0\build\bin"

//mongocxx driver
cmake -G "Visual Studio 14 Win64" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:\p\tools\MongoDB\mongo-c-driver-1.7.0\build\bin -DLIBMONGOC_DIR=C:\p\tools\MongoDB\mongo-c-driver-1.7.0\build\bin -DLIBBSON_DIR=C:\p\tools\MongoDB\mongo-c-driver-1.7.0\build\bin -DCMAKE_PREFIX_PATH=C:\p\tools\MongoDB\mongo-c-driver-1.7.0\build\bin -DBOOST_ROOT=C:\p\tools\boost_1_64_0

Once I generate the project files I open the solution in Visual Studio and do a build.

Thanks
Nathan

Comment by Hannes Magnusson [ 18/Aug/17 ]

How did you install libbson? And what version is it?
How did you install mongocxx? And what version is it?

Generated at Wed Feb 07 21:14:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.