qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-5134) Windows compile error - framing::Buffer::getUInt() not exported from dll
Date Mon, 16 Sep 2013 22:47:52 GMT

    [ https://issues.apache.org/jira/browse/QPID-5134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13768895#comment-13768895
] 

ASF subversion and git services commented on QPID-5134:
-------------------------------------------------------

Commit 1523827 from [~astitcher] in branch 'qpid/trunk'
[ https://svn.apache.org/r1523827 ]

QPID-5134: Export specialized versions of qpid::framing::Buffer::getUInt
from qpidcommon DLL
                
> Windows compile error - framing::Buffer::getUInt() not exported from dll
> ------------------------------------------------------------------------
>
>                 Key: QPID-5134
>                 URL: https://issues.apache.org/jira/browse/QPID-5134
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: 0.24
>         Environment: Windows + proton
>            Reporter: Chuck Rolke
>
> In framing::Buffer.h
> {code}
>     template <int n>
>     QPID_COMMON_EXTERN uint64_t getUInt();
> {code}
> In framing::Buffer.cpp
> {code}
>     template <>
>     uint64_t Buffer::getUInt<1>() {
>         return getOctet();
>     }
>     template <>
>     uint64_t Buffer::getUInt<2>() {
>         return getShort();
>     }
>     ...
> {code}
> The code fails to link:
> {noformat}
> error LNK2019: unresolved external symbol 
>  "unsigned __int64 qpid::framing::Buffer::getUInt<4>(void)" 
> referenced in function 
>  "unsigned int qpid::broker::amqp::OutgoingFromQueue::Record::
>   getIndex(struct pn_delivery_tag_t)
> {noformat}
> In previous issues (QPID-2926) windows code has manually generated instances of the template
functions so that the DLL could export them. This time that trick doesn't work.
> Is this code a violation of "The implementation of template functions must be available
in accessible header files to enable the compiler to generate the code for the concrete type."
?
> For completeness there is also a failure sister Buffer::putUInt<n>() functions.
Probably the same fix would be good for both errors.
> I can think of some c-style solutions for this problem that would work straight away...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message