<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:58:08 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-81] On Windows, MONGO_API functions should be decorated with __cdecl.</title>
                <link>https://jira.mongodb.org/browse/CXX-81</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;For example, in Windows, a proper library explicitly specifies the calling convention for each function:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;void __cdecl mongo::connect(char* host)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;We are using the default calling convention right now, which is __cdecl.  If someone is using __stdcall in their project, they won&apos;t be able to use the C++ driver because the calling convention is wrong.  Actually, they will be able to compile just fine but run time will not work (and it might not even be obvious what is wrong at first).&lt;/p&gt;

&lt;p&gt;Typically, the __cdecl is hidden inside a macro; we could use MONGO_API:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;#ifdef WIN32&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;#define MONGO_API __cdecl&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;#else&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;#define MONGO_API&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;#endif&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;If we decide to release a DLL or .so library in the future, we could also use the MONGO_API macro to affect the visibility of the API functions using dllexport or gcc attributes.&lt;/p&gt;</description>
                <environment></environment>
        <key id="36698">CXX-81</key>
            <summary>On Windows, MONGO_API functions should be decorated with __cdecl.</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="9">Done</resolution>
                                        <assignee username="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="milkie@mongodb.com">Eric Milkie</reporter>
                        <labels>
                            <label>cxxmove</label>
                            <label>legacy-cxx</label>
                            <label>windows</label>
                    </labels>
                <created>Thu, 19 Apr 2012 14:32:24 +0000</created>
                <updated>Sun, 4 May 2014 19:32:16 +0000</updated>
                            <resolved>Fri, 18 Apr 2014 19:37:10 +0000</resolved>
                                                    <fixVersion>legacy-0.8.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="559043" author="xgen-internal-githook" created="Tue, 22 Apr 2014 16:34:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;acmorrow&apos;, u&apos;name&apos;: u&apos;Andrew Morrow&apos;, u&apos;email&apos;: u&apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-81&quot; title=&quot;On Windows, MONGO_API functions should be decorated with __cdecl.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-81&quot;&gt;&lt;del&gt;CXX-81&lt;/del&gt;&lt;/a&gt; Obtain cdecl via compiler headers rather than redefining&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/126ca2f8e5c39c0d7e3c201fc6de5fa00da81a3c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/126ca2f8e5c39c0d7e3c201fc6de5fa00da81a3c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="554998" author="acm" created="Fri, 18 Apr 2014 19:37:04 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/55&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/55&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="554996" author="xgen-internal-githook" created="Fri, 18 Apr 2014 19:35:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;acmorrow&apos;, u&apos;name&apos;: u&apos;Andrew Morrow&apos;, u&apos;email&apos;: u&apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-81&quot; title=&quot;On Windows, MONGO_API functions should be decorated with __cdecl.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-81&quot;&gt;&lt;del&gt;CXX-81&lt;/del&gt;&lt;/a&gt; Tag all exported free functions with calling convention macro&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/7b5b9bd8d6ba15c3009285839704626fa8a9a4bc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/7b5b9bd8d6ba15c3009285839704626fa8a9a4bc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="554692" author="acm" created="Fri, 18 Apr 2014 16:04:42 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/55&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/55&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="468963" author="schwerin" created="Tue, 10 Dec 2013 22:59:48 +0000"  >&lt;p&gt;__cdecl declaration, to be complete, would probably involve annotating every member function in every class, and can only matter on 32-bit Windows in practice.  Deferring.&lt;/p&gt;</comment>
                            <comment id="468959" author="xgen-internal-githook" created="Tue, 10 Dec 2013 22:54:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;andy10gen&apos;, u&apos;name&apos;: u&apos;Andy Schwerin&apos;, u&apos;email&apos;: u&apos;schwerin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3364&quot; title=&quot;The C++ Driver compiled as shared library must export the API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3364&quot;&gt;&lt;del&gt;SERVER-3364&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-81&quot; title=&quot;On Windows, MONGO_API functions should be decorated with __cdecl.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-81&quot;&gt;&lt;del&gt;SERVER-5650&lt;/del&gt;&lt;/a&gt; Define away MONGO_CLIENT_API when not building the shared library.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/82e8115bacf418f3fe8af50e04b7d6ca218d87f1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/82e8115bacf418f3fe8af50e04b7d6ca218d87f1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="468024" author="xgen-internal-githook" created="Mon, 9 Dec 2013 19:38:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;andy10gen&apos;, u&apos;name&apos;: u&apos;Andy Schwerin&apos;, u&apos;email&apos;: u&apos;schwerin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3364&quot; title=&quot;The C++ Driver compiled as shared library must export the API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3364&quot;&gt;&lt;del&gt;SERVER-3364&lt;/del&gt;&lt;/a&gt; Introduce MONGO_CLIENT_API macro for labeling types, functions and variables.&lt;/p&gt;

&lt;p&gt;Also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-81&quot; title=&quot;On Windows, MONGO_API functions should be decorated with __cdecl.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-81&quot;&gt;&lt;del&gt;SERVER-5650&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1df18f9530aec174f384d5f4ff5efda8218ecd32&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1df18f9530aec174f384d5f4ff5efda8218ecd32&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="468022" author="xgen-internal-githook" created="Mon, 9 Dec 2013 19:37:59 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;andy10gen&apos;, u&apos;name&apos;: u&apos;Andy Schwerin&apos;, u&apos;email&apos;: u&apos;schwerin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3364&quot; title=&quot;The C++ Driver compiled as shared library must export the API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3364&quot;&gt;&lt;del&gt;SERVER-3364&lt;/del&gt;&lt;/a&gt; Add macros for putting visibility and calling convention declarations on declarations.&lt;/p&gt;

&lt;p&gt;Also &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-81&quot; title=&quot;On Windows, MONGO_API functions should be decorated with __cdecl.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-81&quot;&gt;&lt;del&gt;SERVER-5650&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;MONGO_COMPILER_API_EXPORT Puts the &quot;export visibility&quot; declaration on a type,&lt;br/&gt;
    function or variable.&lt;/p&gt;

&lt;p&gt;MONGO_COMPILER_API_IMPORT Puts the &quot;import from library&quot; declaration on a type,&lt;br/&gt;
    function or variable.&lt;/p&gt;

&lt;p&gt;MONGO_COMPILER_API_CALLING_CONVENTION Labels a function declaration with its&lt;br/&gt;
    calling convention.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3100d120989881a47b9efbaaad5aec49980301d4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3100d120989881a47b9efbaaad5aec49980301d4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="466167" author="xgen-internal-githook" created="Thu, 5 Dec 2013 15:08:52 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;andy10gen&apos;, u&apos;name&apos;: u&apos;Andy Schwerin&apos;, u&apos;email&apos;: u&apos;schwerin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3364&quot; title=&quot;The C++ Driver compiled as shared library must export the API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3364&quot;&gt;&lt;del&gt;SERVER-3364&lt;/del&gt;&lt;/a&gt;,&lt;a href=&quot;https://jira.mongodb.org/browse/CXX-81&quot; title=&quot;On Windows, MONGO_API functions should be decorated with __cdecl.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-81&quot;&gt;&lt;del&gt;SERVER-5650&lt;/del&gt;&lt;/a&gt; Move documenation of MONGO_COMPILER macros to compiler.h.&lt;/p&gt;

&lt;p&gt;This deduplicates documentation, hopefully preventing the documentation from diverging.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1f0b640fb7b0f6de22fe098f12d3b05b23c1caf4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1f0b640fb7b0f6de22fe098f12d3b05b23c1caf4&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="76889">CXX-112</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="19053">SERVER-3364</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="76371">SERVER-9771</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="100263">SERVER-11879</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|hriaov:</customfieldvalue>

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