The version of the driver you are trying to build (branch or tag).
~ Apparently, successfully built. Version 1.22.0
Host OS, version, and architecture.
~ macOS Monterey 12.4, Apple M1
C Compiler and version.
~ Apple clang version 13.1.6 (clang-1316.0.21.2.5)
~ InstalledDir: /Library/Developer/CommandLineTools/usr/bin
- The output of any
cmake
,make
, or other commands executed during the build.
Compiling gives …
193 warnings generated.
ld: library not found for -l/opt/homebrew/Cellar/mongo-c-driver/1.22.0/lib/cmake/mongoc-1.0
hello.c …
#include <mongoc/mongoc.h>
int main() {
const char *uri_string = "mongodb://localhost:27017";
mongoc_uri_t *uri;
mongoc_client_t *client;
mongoc_database_t *database;
mongoc_collection_t *collection;
bson_t *command, reply, *insert;
bson_error_t error;
char *str;
bool retval;
/*
* Required to initialize libmongoc's internals
*/
mongoc_init ();
printf( "Hello, world!\n" );
}
Content of library directory …
ls -lh /opt/homebrew/Cellar/mongo-c-driver/1.22.0/lib/cmake/mongoc-1.0
total 40
-r–r–r-- 1 james admin 1.9K 29 Jun 17:41 mongoc-1.0-config-version.cmake
-r–r–r-- 1 james admin 125B 29 Jun 17:41 mongoc-1.0-config.cmake
-r–r–r-- 1 james admin 1.4K 29 Jun 17:41 mongoc-targets-release.cmake
-r–r–r-- 1 james admin 4.8K 29 Jun 17:41 mongoc-targets.cmake
I was expecting some files with today’s date within the directory.
Any ideas? I will be happy to supply further info on request. Thanks in advance for your time.