You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/10/10 19:51:34 UTC

[jira] [Commented] (QPID-6140) [C++ Messaging] UI Gotchya in Hello World example

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

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

Commit 1630945 from chug@apache.org in branch 'qpid/trunk'
[ https://svn.apache.org/r1630945 ]

QPID-6140: [C++ Messaging] hello_world does not define Messaging i/f completely
Add qpidtypes to hello_world and hello_xml example link library list so that 
users can execute any Messaging function straight away.

> [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