I am trying to connect my Matlab with MongoDB using the mongoc function in Matlab 2021b version. But I am having this error - Files\MATL​AB\R2021b\​bin\win64\​builtins\d​atabas

조회 수: 12 (최근 30일)
I have trying to connect my Matlab with MongoDB using the mongoc function in Matlab R 2021b version.
But I am having this error -
Files\MATLAB\R2021b\bin\win64\builtins\database_builtins\mwlibmongo_builtinimpl.dll failed with error: not connected: not connected
The specified module could not be found.
Below is my code;
addpath( [ '..' filesep 'MALARIA' filesep 'C Driver' filesep 'mongo-c-driver-1.17.6.tar.gz'] );
server = '127.0.0.1';
port = 27017;
dbname = "TestDB";
% Connect to server
conn = mongoc(server,port,dbname) ;
  댓글 수: 1
gabriel paranthoen
gabriel paranthoen 2022년 1월 28일
Hi,
I fixed the error installing visualcode c++ prior installing the database toolbox.
the connector using the mongodb c++ driver, it's required I guess during the installation.
gabriel

댓글을 달려면 로그인하십시오.

채택된 답변

Tanmay Das
Tanmay Das 2021년 12월 30일
Hi,
The issue is probably because a module used inside this library is missing. It is advised to check if all the necessary modules and packages are installed in your machine. You may look into "mongoc" function documentation for further information. In order to identify what modules are missing, you may leverage Dependency Walker for the same. Please look into this link for further clarity.
  댓글 수: 2
Yunus Abdulhameed Abdussalam
Yunus Abdulhameed Abdussalam 2021년 12월 30일
Hi Tanmay,
Thanks. But please do I need need to add any mongo-c-driver in order to connect Matlab to the MongoDB? if yes, please how to I go about it?
Guido Avvisati
Guido Avvisati 2023년 2월 15일
편집: Guido Avvisati 2023년 2월 15일
Hi,
I am experiencing the same issue on win10 and R2021b. I used Dependency Walker, but at first glance it gives me the same uninformative messages as matlab.
>>> loadlibrary('C:\Program Files\MATLAB\R2021b\bin\win64\builtins\database_builtins\mwlibmongo_builtinimpl.dll')
Error using loadlibrary
Could not find file mwlibmongo_builtinimpl.h.
Indeed I cannot locate this header file under
C:\Program Files\MATLAB\R2021b\extern\include
or any other path in the R2021b folder.
I am hitting 0 results on google for which library provides such file. Any ideas on how to proceed further?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2021년 12월 30일
You cannot add a file with addpath() . MATLAB will not automatically expand the file and look inside it.
Also, if what you posted is the complete message, then you are having a problem with spaces in the directory name of the DLL -- but it is not obvious at the moment why that particular DLL was being looked for.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by