You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Joe Ly <jo...@mikelinc.com> on 2012/10/15 17:25:21 UTC

learn how to compile a C++ source code that uses QPID 0.18

Hi,

I am trying to compile "map_receiver.cpp" that lives in ~/qpidc-0.18/examples/messaging using the following command string under Linux Centos 6.3 environment:

g++ -v -Wall -O3 -I. -I~/qpidc-0.18/include -L~/qpidc-0.18/src -lqpidmessaging -o map_receiver map_receiver.cpp

Am I missing anything?


Thanks,

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


Re: learn how to compile a C++ source code that uses QPID 0.18

Posted by "Darryl L. Pierce" <dp...@redhat.com>.
On Mon, Oct 15, 2012 at 11:25:21AM -0400, Joe Ly wrote:
> Hi,
> 
> I am trying to compile "map_receiver.cpp" that lives in ~/qpidc-0.18/examples/messaging using the following command string under Linux Centos 6.3 environment:
> 
> g++ -v -Wall -O3 -I. -I~/qpidc-0.18/include -L~/qpidc-0.18/src -lqpidmessaging -o map_receiver map_receiver.cpp
> 
> Am I missing anything?

You need to also include the qpidtypes library as well. The current
Makefile that ships with the qpid-cpp-client-devel package in the
examples directory was missing this library.

-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/


RE: learn how to compile a C++ source code that uses QPID 0.18

Posted by Joe Ly <jo...@mikelinc.com>.
Thanks a lot, Steve!!! I got it compiled successfully!


Joe Ly

________________________________________
From: Steve Huston [shuston@riverace.com]
Sent: Monday, October 15, 2012 12:09 PM
To: users@qpid.apache.org
Subject: Re: learn how to compile a C++ source code that uses QPID 0.18

Replace ~ with the path to your home directory.
-Steve

On 10/15/12 11:56 AM, "Joe Ly" <jo...@mikelinc.com> wrote:

>This is what I received after execution:
>
>
>
>[joely@localhost messaging]$ g++ -v -Wall -O3 -I. -I~/qpidc-0.18/include
>-L~/qpidc-0.18/src -lqpidmessaging -o map_receiver map_receiver.cpp
>Using built-in specs.
>Target: x86_64-redhat-linux
>Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
>--infodir=/usr/share/info
>--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
>--enable-shared --enable-threads=posix --enable-checking=release
>--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
>--enable-gnu-unique-object
>--enable-languages=c,c++,objc,obj-c++,java,fortran,ada
>--enable-java-awt=gtk --disable-dssi
>--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
>--enable-libgcj-multifile --enable-java-maintainer-mode
>--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
>--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
>--build=x86_64-redhat-linux
>Thread model: posix
>gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
>COLLECT_GCC_OPTIONS='-v' '-Wall' '-O3' '-I.' '-I~/qpidc-0.18/include'
>'-L~/qpidc-0.18/src' '-o' 'map_receiver' '-shared-libgcc' '-mtune=generic'
> /usr/libexec/gcc/x86_64-redhat-linux/4.4.6/cc1plus -quiet -v -I.
>-I~/qpidc-0.18/include -D_GNU_SOURCE map_receiver.cpp -quiet -dumpbase
>map_receiver.cpp -mtune=generic -auxbase map_receiver -O3 -Wall -version
>-o /tmp/ccWnxirN.s
>ignoring nonexistent directory
>"/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include-fixed"
>ignoring nonexistent directory
>"/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../x86_64-redhat-linux/in
>clude"
>ignoring nonexistent directory "~/qpidc-0.18/include"
>#include "..." search starts here:
>#include <...> search starts here:
> .
> /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6
>
>/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/x86_6
>4-redhat-linux
>
>/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/backw
>ard
> /usr/local/include
> /usr/lib/gcc/x86_64-redhat-linux/4.4.6/include
> /usr/include
>End of search list.
>GNU C++ (GCC) version 4.4.6 20120305 (Red Hat 4.4.6-4)
>(x86_64-redhat-linux)
>       compiled by GNU C version 4.4.6 20120305 (Red Hat 4.4.6-4), GMP version
>4.3.1, MPFR version 2.4.1.
>GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
>Compiler executable checksum: 8c4401476b260ed4dfa10868f7ed486b
>map_receiver.cpp:22:39: error: qpid/messaging/Connection.h: No such file
>or directory
>map_receiver.cpp:23:36: error: qpid/messaging/Message.h: No such file or
>directory
>map_receiver.cpp:24:37: error: qpid/messaging/Receiver.h: No such file or
>directory
>map_receiver.cpp:25:36: error: qpid/messaging/Session.h: No such file or
>directory
>map_receiver.cpp:32: error: Œqpid¹ has not been declared
>map_receiver.cpp:32: error: Œmessaging¹ is not a namespace-name
>map_receiver.cpp:32: error: expected namespace-name before Œ;¹ token
>map_receiver.cpp:33: error: Œqpid¹ has not been declared
>map_receiver.cpp:33: error: Œtypes¹ is not a namespace-name
>map_receiver.cpp:33: error: expected namespace-name before Œ;¹ token
>map_receiver.cpp: In function Œint main(int, char**)¹:
>map_receiver.cpp:43: error: ŒConnection¹ was not declared in this scope
>map_receiver.cpp:43: error: expected Œ;¹ before Œconnection¹
>map_receiver.cpp:45: error: Œconnection¹ was not declared in this scope
>map_receiver.cpp:46: error: ŒSession¹ was not declared in this scope
>map_receiver.cpp:46: error: expected Œ;¹ before Œsession¹
>map_receiver.cpp:47: error: ŒReceiver¹ was not declared in this scope
>map_receiver.cpp:47: error: expected Œ;¹ before Œreceiver¹
>map_receiver.cpp:48: error: ŒVariant¹ has not been declared
>map_receiver.cpp:48: error: expected Œ;¹ before Œcontent¹
>map_receiver.cpp:49: error: Œreceiver¹ was not declared in this scope
>map_receiver.cpp:49: error: Œcontent¹ was not declared in this scope
>map_receiver.cpp:49: error: Œdecode¹ was not declared in this scope
>map_receiver.cpp:51: error: Œsession¹ was not declared in this scope
>map_receiver.cpp:57: error: Œconnection¹ was not declared in this scope
>map_receiver.cpp:39: warning: unused variable Œurl¹
>map_receiver.cpp:40: warning: unused variable Œaddress¹
>
>
>
>
>Joe Ly
>
>________________________________________
>From: Steve Huston [shuston@riverace.com]
>Sent: Monday, October 15, 2012 11:52 AM
>To: users@qpid.apache.org
>Subject: Re: learn how to compile a C++ source code that uses QPID 0.18
>
>What errors are you getting?
>
>On 10/15/12 11:25 AM, "Joe Ly" <jo...@mikelinc.com> wrote:
>
>>Hi,
>>
>>I am trying to compile "map_receiver.cpp" that lives in
>>~/qpidc-0.18/examples/messaging using the following command string under
>>Linux Centos 6.3 environment:
>>
>>g++ -v -Wall -O3 -I. -I~/qpidc-0.18/include -L~/qpidc-0.18/src
>>-lqpidmessaging -o map_receiver map_receiver.cpp
>>
>>Am I missing anything?
>>
>>
>>Thanks,
>>
>>Joe Ly
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>>For additional commands, e-mail: users-help@qpid.apache.org
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>For additional commands, e-mail: users-help@qpid.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>For additional commands, e-mail: users-help@qpid.apache.org
>


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


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


Re: learn how to compile a C++ source code that uses QPID 0.18

Posted by Steve Huston <sh...@riverace.com>.
Replace ~ with the path to your home directory.
-Steve

On 10/15/12 11:56 AM, "Joe Ly" <jo...@mikelinc.com> wrote:

>This is what I received after execution:
>
>
>
>[joely@localhost messaging]$ g++ -v -Wall -O3 -I. -I~/qpidc-0.18/include
>-L~/qpidc-0.18/src -lqpidmessaging -o map_receiver map_receiver.cpp
>Using built-in specs.
>Target: x86_64-redhat-linux
>Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
>--infodir=/usr/share/info
>--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
>--enable-shared --enable-threads=posix --enable-checking=release
>--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
>--enable-gnu-unique-object
>--enable-languages=c,c++,objc,obj-c++,java,fortran,ada
>--enable-java-awt=gtk --disable-dssi
>--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
>--enable-libgcj-multifile --enable-java-maintainer-mode
>--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
>--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
>--build=x86_64-redhat-linux
>Thread model: posix
>gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
>COLLECT_GCC_OPTIONS='-v' '-Wall' '-O3' '-I.' '-I~/qpidc-0.18/include'
>'-L~/qpidc-0.18/src' '-o' 'map_receiver' '-shared-libgcc' '-mtune=generic'
> /usr/libexec/gcc/x86_64-redhat-linux/4.4.6/cc1plus -quiet -v -I.
>-I~/qpidc-0.18/include -D_GNU_SOURCE map_receiver.cpp -quiet -dumpbase
>map_receiver.cpp -mtune=generic -auxbase map_receiver -O3 -Wall -version
>-o /tmp/ccWnxirN.s
>ignoring nonexistent directory
>"/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include-fixed"
>ignoring nonexistent directory
>"/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../x86_64-redhat-linux/in
>clude"
>ignoring nonexistent directory "~/qpidc-0.18/include"
>#include "..." search starts here:
>#include <...> search starts here:
> .
> /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6
> 
>/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/x86_6
>4-redhat-linux
> 
>/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/backw
>ard
> /usr/local/include
> /usr/lib/gcc/x86_64-redhat-linux/4.4.6/include
> /usr/include
>End of search list.
>GNU C++ (GCC) version 4.4.6 20120305 (Red Hat 4.4.6-4)
>(x86_64-redhat-linux)
>	compiled by GNU C version 4.4.6 20120305 (Red Hat 4.4.6-4), GMP version
>4.3.1, MPFR version 2.4.1.
>GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
>Compiler executable checksum: 8c4401476b260ed4dfa10868f7ed486b
>map_receiver.cpp:22:39: error: qpid/messaging/Connection.h: No such file
>or directory
>map_receiver.cpp:23:36: error: qpid/messaging/Message.h: No such file or
>directory
>map_receiver.cpp:24:37: error: qpid/messaging/Receiver.h: No such file or
>directory
>map_receiver.cpp:25:36: error: qpid/messaging/Session.h: No such file or
>directory
>map_receiver.cpp:32: error: Œqpid¹ has not been declared
>map_receiver.cpp:32: error: Œmessaging¹ is not a namespace-name
>map_receiver.cpp:32: error: expected namespace-name before Œ;¹ token
>map_receiver.cpp:33: error: Œqpid¹ has not been declared
>map_receiver.cpp:33: error: Œtypes¹ is not a namespace-name
>map_receiver.cpp:33: error: expected namespace-name before Œ;¹ token
>map_receiver.cpp: In function Œint main(int, char**)¹:
>map_receiver.cpp:43: error: ŒConnection¹ was not declared in this scope
>map_receiver.cpp:43: error: expected Œ;¹ before Œconnection¹
>map_receiver.cpp:45: error: Œconnection¹ was not declared in this scope
>map_receiver.cpp:46: error: ŒSession¹ was not declared in this scope
>map_receiver.cpp:46: error: expected Œ;¹ before Œsession¹
>map_receiver.cpp:47: error: ŒReceiver¹ was not declared in this scope
>map_receiver.cpp:47: error: expected Œ;¹ before Œreceiver¹
>map_receiver.cpp:48: error: ŒVariant¹ has not been declared
>map_receiver.cpp:48: error: expected Œ;¹ before Œcontent¹
>map_receiver.cpp:49: error: Œreceiver¹ was not declared in this scope
>map_receiver.cpp:49: error: Œcontent¹ was not declared in this scope
>map_receiver.cpp:49: error: Œdecode¹ was not declared in this scope
>map_receiver.cpp:51: error: Œsession¹ was not declared in this scope
>map_receiver.cpp:57: error: Œconnection¹ was not declared in this scope
>map_receiver.cpp:39: warning: unused variable Œurl¹
>map_receiver.cpp:40: warning: unused variable Œaddress¹
> 
>
>
>
>Joe Ly
>
>________________________________________
>From: Steve Huston [shuston@riverace.com]
>Sent: Monday, October 15, 2012 11:52 AM
>To: users@qpid.apache.org
>Subject: Re: learn how to compile a C++ source code that uses QPID 0.18
>
>What errors are you getting?
>
>On 10/15/12 11:25 AM, "Joe Ly" <jo...@mikelinc.com> wrote:
>
>>Hi,
>>
>>I am trying to compile "map_receiver.cpp" that lives in
>>~/qpidc-0.18/examples/messaging using the following command string under
>>Linux Centos 6.3 environment:
>>
>>g++ -v -Wall -O3 -I. -I~/qpidc-0.18/include -L~/qpidc-0.18/src
>>-lqpidmessaging -o map_receiver map_receiver.cpp
>>
>>Am I missing anything?
>>
>>
>>Thanks,
>>
>>Joe Ly
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>>For additional commands, e-mail: users-help@qpid.apache.org
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>For additional commands, e-mail: users-help@qpid.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>For additional commands, e-mail: users-help@qpid.apache.org
>


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


RE: learn how to compile a C++ source code that uses QPID 0.18

Posted by Joe Ly <jo...@mikelinc.com>.
This is what I received after execution:



[joely@localhost messaging]$ g++ -v -Wall -O3 -I. -I~/qpidc-0.18/include -L~/qpidc-0.18/src -lqpidmessaging -o map_receiver map_receiver.cpp
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-Wall' '-O3' '-I.' '-I~/qpidc-0.18/include' '-L~/qpidc-0.18/src' '-o' 'map_receiver' '-shared-libgcc' '-mtune=generic'
 /usr/libexec/gcc/x86_64-redhat-linux/4.4.6/cc1plus -quiet -v -I. -I~/qpidc-0.18/include -D_GNU_SOURCE map_receiver.cpp -quiet -dumpbase map_receiver.cpp -mtune=generic -auxbase map_receiver -O3 -Wall -version -o /tmp/ccWnxirN.s
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../x86_64-redhat-linux/include"
ignoring nonexistent directory "~/qpidc-0.18/include"
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6
 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/x86_64-redhat-linux
 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/backward
 /usr/local/include
 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/include
 /usr/include
End of search list.
GNU C++ (GCC) version 4.4.6 20120305 (Red Hat 4.4.6-4) (x86_64-redhat-linux)
	compiled by GNU C version 4.4.6 20120305 (Red Hat 4.4.6-4), GMP version 4.3.1, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 8c4401476b260ed4dfa10868f7ed486b
map_receiver.cpp:22:39: error: qpid/messaging/Connection.h: No such file or directory
map_receiver.cpp:23:36: error: qpid/messaging/Message.h: No such file or directory
map_receiver.cpp:24:37: error: qpid/messaging/Receiver.h: No such file or directory
map_receiver.cpp:25:36: error: qpid/messaging/Session.h: No such file or directory
map_receiver.cpp:32: error: ‘qpid’ has not been declared
map_receiver.cpp:32: error: ‘messaging’ is not a namespace-name
map_receiver.cpp:32: error: expected namespace-name before ‘;’ token
map_receiver.cpp:33: error: ‘qpid’ has not been declared
map_receiver.cpp:33: error: ‘types’ is not a namespace-name
map_receiver.cpp:33: error: expected namespace-name before ‘;’ token
map_receiver.cpp: In function ‘int main(int, char**)’:
map_receiver.cpp:43: error: ‘Connection’ was not declared in this scope
map_receiver.cpp:43: error: expected ‘;’ before ‘connection’
map_receiver.cpp:45: error: ‘connection’ was not declared in this scope
map_receiver.cpp:46: error: ‘Session’ was not declared in this scope
map_receiver.cpp:46: error: expected ‘;’ before ‘session’
map_receiver.cpp:47: error: ‘Receiver’ was not declared in this scope
map_receiver.cpp:47: error: expected ‘;’ before ‘receiver’
map_receiver.cpp:48: error: ‘Variant’ has not been declared
map_receiver.cpp:48: error: expected ‘;’ before ‘content’
map_receiver.cpp:49: error: ‘receiver’ was not declared in this scope
map_receiver.cpp:49: error: ‘content’ was not declared in this scope
map_receiver.cpp:49: error: ‘decode’ was not declared in this scope
map_receiver.cpp:51: error: ‘session’ was not declared in this scope
map_receiver.cpp:57: error: ‘connection’ was not declared in this scope
map_receiver.cpp:39: warning: unused variable ‘url’
map_receiver.cpp:40: warning: unused variable ‘address’
 



Joe Ly

________________________________________
From: Steve Huston [shuston@riverace.com]
Sent: Monday, October 15, 2012 11:52 AM
To: users@qpid.apache.org
Subject: Re: learn how to compile a C++ source code that uses QPID 0.18

What errors are you getting?

On 10/15/12 11:25 AM, "Joe Ly" <jo...@mikelinc.com> wrote:

>Hi,
>
>I am trying to compile "map_receiver.cpp" that lives in
>~/qpidc-0.18/examples/messaging using the following command string under
>Linux Centos 6.3 environment:
>
>g++ -v -Wall -O3 -I. -I~/qpidc-0.18/include -L~/qpidc-0.18/src
>-lqpidmessaging -o map_receiver map_receiver.cpp
>
>Am I missing anything?
>
>
>Thanks,
>
>Joe Ly
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>For additional commands, e-mail: users-help@qpid.apache.org
>


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


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


Re: learn how to compile a C++ source code that uses QPID 0.18

Posted by Steve Huston <sh...@riverace.com>.
What errors are you getting?

On 10/15/12 11:25 AM, "Joe Ly" <jo...@mikelinc.com> wrote:

>Hi,
>
>I am trying to compile "map_receiver.cpp" that lives in
>~/qpidc-0.18/examples/messaging using the following command string under
>Linux Centos 6.3 environment:
>
>g++ -v -Wall -O3 -I. -I~/qpidc-0.18/include -L~/qpidc-0.18/src
>-lqpidmessaging -o map_receiver map_receiver.cpp
>
>Am I missing anything?
>
>
>Thanks,
>
>Joe Ly
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>For additional commands, e-mail: users-help@qpid.apache.org
>


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