activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Chanu (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQCPP-263) Use of in-class static const variables in cms/DeliveryMode.h results in crash while linking with --no-undefined option
Date Tue, 29 Sep 2009 03:26:52 GMT
Use of in-class static const variables in cms/DeliveryMode.h results in crash while linking
with --no-undefined option
----------------------------------------------------------------------------------------------------------------------

                 Key: AMQCPP-263
                 URL: https://issues.apache.org/activemq/browse/AMQCPP-263
             Project: ActiveMQ C++ Client
          Issue Type: Bug
          Components: CMS Impl
    Affects Versions: 3.0.1, 3.0, 2.2.6
         Environment: - Linux Debian 5.0.1
- gcc 4.3.2
- ActiveMQ-CPP 2.2.6
            Reporter: Romain Chanu
            Assignee: Timothy Bish
            Priority: Blocker


The constants variables defined in cms/DeliveryMode.h (i.e static const int PERSISTENT = 0
and static const int NON_PERSISTENT = 1;) are not defined out off the class. 

In the following cases:

- If you try to take the address of this constant variable.
- You pass it to a function that takes a reference.
- When used with the tertiary operator ?

It results in a crash while linking ActiveMQ-CPP library with an application using the linking
option --no-undefined (GNU linker ld returns "undefined references" for these two variables).

The variables should be defined as an enumeration (like the way it has been done in cms/Session.h
for the acknowledgment modes)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message