qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuck Rolke (JIRA)" <j...@apache.org>
Subject [jira] [Created] (QPID-5134) Windows compile error - framing::Buffer::getUInt() not exported from dll
Date Wed, 11 Sep 2013 21:28:52 GMT
Chuck Rolke created QPID-5134:

             Summary: Windows compile error - framing::Buffer::getUInt() not exported from
                 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
    template <int n>
    QPID_COMMON_EXTERN uint64_t getUInt();

In framing::Buffer.cpp

    template <>
    uint64_t Buffer::getUInt<1>() {
        return getOctet();

    template <>
    uint64_t Buffer::getUInt<2>() {
        return getShort();

The code fails to link:
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)

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

View raw message