@Roberto_Sanchez hi, iam working on mongodbcxx with qt creator in Windows,
Qt creator version Qt 5.11.2 (MSVC 2015, 32 bit)
Project compiler is MingW 32bit.
Build mongodb c & cxx driver with Mingw-64 -success.
Added this library to Qt creator as external dynamic library.
After that clean & Rebuilded. win32:CONFIG(release, debug|release): LIBS += -LC:/mongo-cxx-driver/lib/ -llibmongocxx.dll else:win32:CONFIG(debug, debug|release): LIBS += -LC:/mongo-cxx-driver/lib/ -llibmongocxx.dlld
then error came -llibmongocxx.dlld no such file
Then i removed last d from that -llibmongocxx.dlld.
now build ok.
Then i i added #include <mongocxx/client.hpp> and necessary headers
Then added mongocxx::instance inst{};
Then error came
./release\main.o:main.cpp:(.text+0x1d): undefined reference to _imp___ZN8mongocxx7v_noabi8instanceC1Ev' ./release\main.o:main.cpp:(.text+0xee): undefined reference to _imp___ZN8mongocxx7v_noabi8instanceD1Ev' ./release\main.o:main.cpp:(.text+0x14e): undefined reference to _imp___ZN8mongocxx7v_noabi8instanceD1Ev'
@VIVEK_A I am not familiar with Qt creator, but it may be that you need to specify the library name as libmongocxx instead of libmongocxx.dll. It is also possible that you need to use mongocxx as the library name so that you end with -lmongocxx and -lmongocxxd as the command-line options to the compiler/linker. I say that because based on the pro file excerpt you provided, in the debug branch the option -llibmongocxx.dlld does not seem at all correct.
@Roberto_Sanchez see the content of mongodbcxx/lib folder is libmongocxx.dll.a (.a file).so the lib mention will be libmongocxx.dll right?? and there is feature in Qt creator to add external libraries . so we just need to select the file they will generate code for .pro file…