cd libbson-1.8.0
cmake -G "Visual Studio 15" "-DCMAKE_INSTALL_PREFIX=C:\libbson"
-- Output --
-- The C compiler identification is ;MSVC 19.11.25508.2
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
Current version (from VERSION_CURRENT file): 1.8.0
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for reallocf
-- Looking for reallocf - not found
-- Performing Test BSON_HAVE_TIMESPEC
-- Performing Test BSON_HAVE_TIMESPEC - Success
-- struct timespec found
-- Looking for gmtime_r
-- Looking for gmtime_r - not found
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/jay/Downloads/libbson-1.8.0
cd .\mongo-c-driver-1.8.0
cmake -G "Visual Studio 15" "-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver" "-DENABLE_SSL=WINDOWS" "-DENABLE_SASL=SSPI" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_PREFIX_PATH=C:\libbson" "-DENABLE_STATIC=YES" "-DENABLE_TESTS=NO"
--- Output ---
-- The C compiler identification is ;MSVC 19.11.25508.2
-- The CXX compiler identification is ;MSVC 19.11.25508.2
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Current version (from VERSION_CURRENT file): 1.8.0
-- Searching for libbson CMake packages
-- libbson found version "1.8.0"
-- libbson include path "C:/libbson/include/libbson-1.0"
-- libbson libraries "C:/libbson/lib/bson-1.0.lib"
-- Looking for ASN1_STRING_get0_data in ssl
-- Looking for ASN1_STRING_get0_data in ssl - not found
-- Looking for include file strings.h
-- Looking for include file strings.h - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of socklen_t
-- Check size of socklen_t - done
-- Compiling against Secure Channel
-- Compiling against Windows SSPI
-- Looking for include file byteswap.h
-- Looking for include file byteswap.h - not found
-- Looking for include file dlfcn.h
-- Looking for include file dlfcn.h - not found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file sys/byteswap.h
-- Looking for include file sys/byteswap.h - not found
-- Looking for include file sys/endian.h
-- Looking for include file sys/endian.h - not found
-- Looking for include file sys/mman.h
-- Looking for include file sys/mman.h - not found
-- Looking for include file sys/resource.h
-- Looking for include file sys/resource.h - not found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - not found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - not found
-- Looking for include file windows.h
-- Looking for include file windows.h - found
-- Performing Test HAVE_BUILTIN_EXPECT
-- Performing Test HAVE_BUILTIN_EXPECT - Failed
-- Performing Test HAVE_BUILTIN_CTZ
-- Performing Test HAVE_BUILTIN_CTZ - Failed
-- Enabling snappy compression (bundled)
-- Enabling zlib compression (bundled)
-- Looking for include file stdarg.h
-- Looking for include file stdarg.h - found
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_BUILD_TYPE
-- Build files have been written to: C:/Users/jay/Downloads/mongo-c-driver-1.8.0
cd .\mongo-cxx-driver-r3.1.3
cmake -G "Visual Studio 15" -DCMAKE_INSTALL_PREFIX=C:\mongo-cxx-driver -DCMAKE_PREFIX_PATH=c:\mongo-c-driver -DBOOST_ROOT=C:\local\boost_1_65_1 -DLIBBSON_DIR=C:\libbson -DLIBMONGOC_DIR=C:\mongo-c-driver -DBUILD_SHARED_LIBRARIES=OFF
--- Output ---
-- The CXX compiler identification is MSVC 19.11.25508.2
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No build type selected, default is Release
-- The C compiler identification is MSVC 19.11.25508.2
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found LIBBSON: bson-1.0
-- Boost version: 1.65.1
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
-- Performing Test COMPILER_HAS_DEPRECATED
-- Performing Test COMPILER_HAS_DEPRECATED - Success
-- Found LIBMONGOC: mongoc-1.0
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBRARIES
-- Build files have been written to: C:/Users/jay/Downloads/mongo-cxx-driver-r3.1.3
#include "database.h"
#include <cstdlib>
#include <iostream>
#include <string>
#include <bsoncxx/builder/stream/document.hpp>
#include <bsoncxx/json.hpp>
#include <bsoncxx/stdx/make_unique.hpp>
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
#include <mongocxx/logger.hpp>
#include <mongocxx/options/client.hpp>
#include <mongocxx/uri.hpp>
/**
* Class constructor.
*/
Database::Database()
{
}
/**
* Class destructor.
*/
Database::~Database()
{
}
/**
* Connects to the Database instance.
*/
void Database::Connect()
{
using bsoncxx::builder::stream::document;
mongocxx::instance inst{};
}
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol __imp___getpid referenced in function _mongoc_log StorageConnect E:\Trading\SierraChartStudies\SwingStudy\StorageConnect\mongoc-static-1.0.lib(mongoc-log.obj) 1
Error LNK2019 unresolved external symbol __imp___localtime64_s referenced in function _localtime_s StorageConnect E:\Trading\SierraChartStudies\SwingStudy\StorageConnect\mongoc-static-1.0.lib(mongoc-log.obj) 1
Error LNK2019 unresolved external symbol __except_handler4_common referenced in function __except_handler4 StorageConnect E:\Trading\SierraChartStudies\SwingStudy\StorageConnect\MSVCRTD.lib(_chandler4gs_.obj) 1
Error LNK1120 3 unresolved externals StorageConnect E:\Trading\Data\SierraCharts\StorageConnect.dll 1
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/5d42ca9b-a61b-4887-a1ef-229c4e897b58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for the help on this one Andrew!You were right, there was incorrect linkage occurring with the build path. Even though I had updated the runtime libraries to be used, I was still building to the same target directory and it was preventing the updated binaries to be built and installed. All projects are building as expected now. Greatly appreciate the help.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/35a62bc1-a22f-4914-9f81-15548e97cb47%40googlegroups.com.
Great! I'm happy to hear that my guess proved helpful. Hopefully we will do ABI tagging and auto-linking sometime soon and this will all get simpler.
On Mon, Oct 16, 2017 at 5:24 PM, Jay <jayt...@gmail.com> wrote:
Thanks for the help on this one Andrew!You were right, there was incorrect linkage occurring with the build path. Even though I had updated the runtime libraries to be used, I was still building to the same target directory and it was preventing the updated binaries to be built and installed. All projects are building as expected now. Greatly appreciate the help.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
I am currently facing the same problem, but I can’t figure out how to fix it.
Hi Reda,
Could you please open a new discussion thread along with the following details:
libbson version, installation command and output. mongo-c-driver version, installation command and output.mongo-cxx-driver version, installation command and output.This would make it easier for someone to help debug the problem.
What are the practical steps you did to solve it?
Based on the discussion above , a retry of the build using only one mode (e.g. MT or MTd) consistently for all builds (c driver, c++ driver, application) solved the problem.
Kind regards,
Wan.