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-6140) [C++ Messaging] UI Gotchya in Hello World example
Date Thu, 09 Oct 2014 14:53:34 GMT
Chuck Rolke created QPID-6140:
---------------------------------

             Summary: [C++ Messaging] UI Gotchya in Hello World example
                 Key: QPID-6140
                 URL: https://issues.apache.org/jira/browse/QPID-6140
             Project: Qpid
          Issue Type: Improvement
          Components: Qpid Examples
    Affects Versions: 0.30
         Environment: Fedora 19, trunk build
            Reporter: Chuck Rolke


Modifying hello_world.cpp to add a simple property to a message 
{noformat}
            Message message("Hello world");
            message.getProperties()["id"] = 1;
{noformat}

fails:
{noformat}
Linking CXX executable hello_world
/usr/bin/ld: CMakeFiles/hello_world.dir/hello_world.o: undefined reference to symbol '_ZN4qpid5types7VariantC1ERKS1_'
/usr/bin/ld: note: '_ZN4qpid5types7VariantC1ERKS1_' is defined in DSO /home/chug/git/qpid/build/src/libqpidtypes.so.1
so try adding it to the linker command line
/home/chug/git/qpid/build/src/libqpidtypes.so.1: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [examples/messaging/hello_world] Error 1
make[1]: *** [examples/messaging/CMakeFiles/hello_world.dir/all] Error 2
make: *** [all] Error 2
*** Failure: Exit code 2 ***
{noformat}

What? What's with qpid::types::Variant? The user is adding a property as specified in the
Messaging API spec.

To fix this a user must find hello_world in the cmake file and add 'qpidtypes' as a link library,
rerun cmake, and then rebuild. Strictly speaking qpidtypes isn't needed for the simplest hello_world
case. That said, qpidtypes is linked to qpidmessaging and must be available for hello_world
to run.

Adding qpidtypes to hello_world's target_link_libraries will help new users experiment with
Qpid Messaging more fluently.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message