C ++可执行文件一直在寻找序数入口点 [英] C++ executable keep looking for ordinal entry point
问题描述
我有一个带有以下源代码的C ++应用程序:
I have a C++ application with the below source code:
#include <cstdint>
#include <iostream>
#include <vector>
#include <bsoncxx/json.hpp>
#include <mongocxx/client.hpp>
#include <mongocxx/stdx.hpp>
#include <mongocxx/uri.hpp>
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
using bsoncxx::builder::stream::close_array;
using bsoncxx::builder::stream::close_document;
using bsoncxx::builder::stream::document;
using bsoncxx::builder::stream::finalize;
using bsoncxx::builder::stream::open_array;
using bsoncxx::builder::stream::open_document;
int main(int argc, char** argv)
{
std::cout << "\nJust to be sure!" << std::endl;
// Making a connection to Mongo
mongocxx::instance instance{};
mongocxx::client client{mongocxx::uri{}};
// Access a database
mongocxx::database db = client["results"];
std::cout << "\ndone." << std::endl;
return 0;
}
我使用下面的CMakeLists.txt文件进行编译:
I compile it using the below CMakeLists.txt file:
cmake_minimum_required(VERSION 3.7)
project(testing)
set(APP_SOURCES
test.cpp
)
link_directories(../../installed_mongocxx/lib)
add_executable(testapp ${APP_SOURCES})
target_link_libraries(testapp mongocxx bsoncxx)
target_include_directories(testapp PUBLIC
../../installed_mongocxx/include/mongocxx/v_noabi
../../installed_mongocxx/include/bsoncxx/v_noabi
E:/Softwares/Libraries/Boost/boost_1_64_0
)
install(TARGETS testapp
DESTINATION bin)
我在Windows 10 64bit上使用MSBuild编译程序,没有错误,并且在运行时出现此错误;
I compile the program using MSBuild on Windows 10 64bit without errors, and upon running it gives this error;
The ordinal 4694 could not be located in the dynamic library libmongoc-1.0.dll
C ++代码或CMakeLists.txt是否有任何错误,可能是错误的解释?
Is there anything wrong with the C++ code or CMakeLists.txt that could be explanation of the error?
推荐答案
我注意到您最近一直在询问与mongocxx开发有关的许多问题,这些问题似乎都与之相关.我鼓励您在我们的 mongodb-user Google网上论坛或在我们的 Jira项目中,这将使我们更轻松地为您提供帮助无需在多个地方进行对话就可以跟进的后续问题.
I notice that you've been asking a number of questions related to developing with mongocxx lately that all seem related. I encourage you to either ask a question on our mongodb-user Google Group or on our Jira project, which will make it easier for us to assist you in any follow-up questions you might have without needing to have a conversation in multiple places.
(为此道歉而不是发表评论的道歉; StackOverflow似乎对评论有一定的长度限制,我不能一概而论)
(Apologies for posting this as an answer rather than a comment; StackOverflow seems to have a length limit on comments, and I couldn't fit this in one)
这篇关于C ++可执行文件一直在寻找序数入口点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!