<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:03:39 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CXX-1705] mongodb c++ driver on ubuntu</title>
                <link>https://jira.mongodb.org/browse/CXX-1705</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I am trying to test mongodb c++ driver on ubuntu 16.04.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The driver is installed in&#160;&lt;tt&gt;${Devfolder}/sdk/mongodb/&lt;/tt&gt;&#160;and the test is in&#160;&lt;tt&gt;${Devfolder}/testMongoDb/&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;The code was compliled and tested using:&lt;br/&gt;
&#160;&lt;br/&gt;
{{export PKG_CONFIG_PATH=${Devfolder}/sdk/mongodb/lib/pkgconfigexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${Devfolder}/sdk/mongodb/lib&lt;br/&gt;
c++ --std=c++11 test.cpp -o test $(pkg-config --cflags --libs libmongocxx)}}&lt;/p&gt;

&lt;p&gt;Then I want to use mongodb driver in my CMake project.&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
{{ugitho@ugitho:build$ cmake ..CMake Error at CMakeLists.txt:6 (find_package):By not providing &quot;Findlibbsoncxx.cmake&quot; in CMAKE_MODULE_PATH this project&lt;br/&gt;
  has asked CMake to find a package configuration file provided by  &quot;libbsoncxx&quot;, but CMake did not find one.Could not find a package configuration file provided by &quot;libbsoncxx&quot; with&lt;br/&gt;
  any of the following names:    libbsoncxxConfig.cmake&lt;br/&gt;
    libbsoncxx-config.cmake  Add the installation prefix of &quot;libbsoncxx&quot; to CMAKE_PREFIX_PATH or set&quot;libbsoncxx_DIR&quot; to a directory containing one of the above files.  If&quot;libbsoncxx&quot; provides a separate development package or SDK, be sure it has&lt;br/&gt;
  been installed.-- Configuring incomplete, errors occurred!See also &quot;/home/ugitho/NGUYENKHAC/projects/testMongo/build/CMakeFiles/CMakeOutput.log&quot;.}}&lt;/p&gt;

&lt;p&gt;Here are&#160;&lt;tt&gt;CMakeLists.txt&lt;/tt&gt;&#160;and&#160;&lt;tt&gt;test.cpp&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;CMakeLists.txt&lt;/b&gt;:&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;tt&gt;cmake_minimum_required(VERSION 3.10)project(cmongodb)set(CMAKE_CXX_STANDARD    14)find_package(libbsoncxx REQUIRED)find_package(libmongocxx REQUIRED)include_directories(${LIBMONGOCXX_INCLUDE_DIRS} ${LIBBSONCXX_INCLUDE_DIRS})link_directories(${LIBMONGOCXX_LIBRARY_DIRS} ${LIBBSONCXX_LIBRARY_DIRS})add_executable(cmongodb test.cpp)target_link_libraries(cmongodb ${LIBMONGOCXX_STATIC_LIBRARIES} ${LIBBSONCXX_STATIC_LIBRARIES})&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;test.cpp&lt;/b&gt;:&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;tt&gt;#include &amp;lt;iostream&amp;gt;#include &amp;lt;bsoncxx/builder/stream/document.hpp&amp;gt;#include &amp;lt;bsoncxx/json.hpp&amp;gt;#include &amp;lt;mongocxx/client.hpp&amp;gt;#include &amp;lt;mongocxx/instance.hpp&amp;gt;int main(int, char **) {  std::cout &amp;lt;&amp;lt; &quot;1&quot; &amp;lt;&amp;lt; std::endl;  mongocxx::instance inst{};  mongocxx::client conn{mongocxx::uri{&lt;/tt&gt;;  bsoncxx::builder::stream::document document{};auto collection = conn&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;testdb&amp;quot;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;testcollection&amp;quot;&amp;#93;&lt;/span&gt;;  document &amp;lt;&amp;lt; &quot;hello&quot;&amp;lt;&amp;lt; &quot;world&quot;;  collection.insert_one(document.view());auto cursor = collection.find({});for (auto &amp;amp;&amp;amp;doc : cursor) &lt;/p&gt;
{    std::cout &amp;lt;&amp;lt; bsoncxx::to_json(doc) &amp;lt;&amp;lt; std::endl;}
&lt;p&gt;return 0;}}}&lt;/p&gt;

&lt;p&gt;Do you have any idea about what I missed here?&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/53857863/mongodb-c-driver-on-ubuntu&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://stackoverflow.com/questions/53857863/mongodb-c-driver-on-ubuntu&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>ubuntu 16.04</environment>
        <key id="658667">CXX-1705</key>
            <summary>mongodb c++ driver on ubuntu</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13202">Works as Designed</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="ugitho">NGUYEN KHAC Tho</reporter>
                        <labels>
                            <label>driver</label>
                    </labels>
                <created>Thu, 20 Dec 2018 10:33:20 +0000</created>
                <updated>Fri, 27 Oct 2023 13:13:38 +0000</updated>
                            <resolved>Tue, 1 Jan 2019 17:29:38 +0000</resolved>
                                    <version>3.4.0</version>
                                                    <component>Testing</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2102979" author="ugitho" created="Wed, 2 Jan 2019 12:09:17 +0000"  >&lt;p&gt;Hi Kevin,&lt;/p&gt;

&lt;p&gt;Thanks for the answer.&lt;br/&gt;
I managed to add the path into my CMakeLists.&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;/p&gt;

&lt;p&gt;Tho NGUYEN KHAC&lt;br/&gt;
Software Engineer&lt;br/&gt;
1 Parvis de la Bi&#232;vre&lt;br/&gt;
92160 ANTONY&lt;br/&gt;
T&#233;l: 00 33 6 51 53 71 02&lt;/p&gt;

&lt;p&gt;On Tue, 1 Jan 2019 at 18:30, Kevin Albertson (Jira) &amp;lt;jira@mongodb.org&amp;gt;&lt;/p&gt;
</comment>
                            <comment id="2102774" author="kevin.albertson" created="Tue, 1 Jan 2019 17:29:38 +0000"  >&lt;p&gt;Hi Nguyen,&lt;/p&gt;

&lt;p&gt;I commented on your stack overflow question with some more information. Since this is not a C++ driver bug or feature request, we can provide further assistance in the stack overflow question. But it seems like your issue was solved anyway.&lt;/p&gt;

&lt;p&gt;Best,&lt;br/&gt;
Kevin&lt;/p&gt;</comment>
                            <comment id="2100143" author="ugitho" created="Wed, 26 Dec 2018 08:52:25 +0000"  >&lt;p&gt;Hi guys,&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Do you have any ideas ?&lt;/p&gt;

&lt;p&gt;I am really stuck on this issue.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hu747r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>