[ 
https://issues.apache.org/jira/browse/QPID-6140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chuck Rolke resolved QPID-6140.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 0.31

> [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
>             Fix For: 0.31
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to