Comments (5)
Are you compiling with C++-11 support enabled?
from simpleamqpclient.
I tried but this time(tested on examples) I receive slightly different output from linker
g++ -W -Wall -Wextra -pedantic -std=c++11 basic_return_test.cpp -o test -I/usr/local/include -L/usr/local/lib/pkgconfig/lib -I/usr/include -L/lib
/tmp/cc7NS6oF.o: In function `main':
basic_return_test.cpp:(.text+0x414): undefined reference to `AmqpClient::Channel::DeclareQueue(std::string const&, bool, bool, bool, bool)'
basic_return_test.cpp:(.text+0x4df): undefined reference to `AmqpClient::Channel::BasicConsume(std::string const&, std::string const&, bool, bool, bool, unsigned short)'
basic_return_test.cpp:(.text+0x5cf): undefined reference to `AmqpClient::Channel::BasicPublish(std::string const&, std::string const&, boost::shared_ptr<AmqpClient::BasicMessage>, bool, bool)'
basic_return_test.cpp:(.text+0x6bf): undefined reference to `AmqpClient::Channel::BasicPublish(std::string const&, std::string const&, boost::shared_ptr<AmqpClient::BasicMessage>, bool, bool)'
basic_return_test.cpp:(.text+0x76d): undefined reference to `AmqpClient::Channel::BasicConsumeMessage(std::string const&, boost::shared_ptr<AmqpClient::Envelope>&, int)'
basic_return_test.cpp:(.text+0x7ce): undefined reference to `AmqpClient::BasicMessage::Body() const'
basic_return_test.cpp:(.text+0xc28): undefined reference to `AmqpClient::BasicMessage::Body() const'
/tmp/cc7NS6oF.o: In function `_ZN5boost11make_sharedIN10AmqpClient12BasicMessageERKSsIEEENS_6detail15sp_if_not_arrayIT_E4typeEOT0_DpOT1_':
basic_return_test.cpp:(.text._ZN5boost11make_sharedIN10AmqpClient12BasicMessageERKSsIEEENS_6detail15sp_if_not_arrayIT_E4typeEOT0_DpOT1_[_ZN5boost11make_sharedIN10AmqpClient12BasicMessageERKSsIEEENS_6detail15sp_if_not_arrayIT_E4typeEOT0_DpOT1_]+0x78): undefined reference to `AmqpClient::BasicMessage::BasicMessage(std::string const&)'
/tmp/cc7NS6oF.o: In function `_ZN5boost11make_sharedIN10AmqpClient7ChannelERKSsIRiS4_S4_S4_S5_EEENS_6detail15sp_if_not_arrayIT_E4typeEOT0_DpOT1_':
basic_return_test.cpp:(.text._ZN5boost11make_sharedIN10AmqpClient7ChannelERKSsIRiS4_S4_S4_S5_EEENS_6detail15sp_if_not_arrayIT_E4typeEOT0_DpOT1_[_ZN5boost11make_sharedIN10AmqpClient7ChannelERKSsIRiS4_S4_S4_S5_EEENS_6detail15sp_if_not_arrayIT_E4typeEOT0_DpOT1_]+0x10e): undefined reference to `AmqpClient::Channel::Channel(std::string const&, int, std::string const&, std::string const&, std::string const&, int)'
collect2: error: ld returned 1 exit status
from simpleamqpclient.
SimpleAmqpClient doesn't have to be compiled with C++-11 support. It can be compiled and used both ways. Which ever way you go, be sure to compile you entire application with similar C++-11 flags.
Make sure you link in the SimpleAmqpClient library (with -lSimpleAmqpClient
) when trying to compile.
from simpleamqpclient.
Thx, I added '-lSimpleAmqpclinet' parameter, and it solved my problem
from simpleamqpclient.
how to add this to Cmakelists.txt?
from simpleamqpclient.
Related Issues (20)
- Classify Exceptions
- Consumer stops consuming inside Docker container (after some idle period) HOT 1
- fatal error: SimpleAmqpClient/SimpleAmqpClient.h: No such file or directory HOT 1
- Channel::OpenOpts::FromUri results in Access violation reading location 0x0000000000000000. HOT 3
- Version 2.4 compatibility with newer Rabbit servers HOT 4
- Latest NuGet of SimpleAmqpClient HOT 1
- Linking the library on Linux using cmake
- Keep alive for long running connections HOT 3
- App crashes when connection closes HOT 2
- `std::bad_alloc()` when header table is empty
- Handle node failure in RabbitMQ cluster
- Support for Quorum queues
- Bug,Exclusive always true!
- Channel can't open
- Compiling with boost 1.82 generates deprecation warnings
- On the issue of creating channels HOT 7
- Test Mate C++ VSCode
- warning: catching polymorphic type 'class AmqpClient::NotFoundException' by value [-Wcatch-value=] HOT 1
- build error with boost 1.53 HOT 1
- Linker error when building DLL on Windows 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simpleamqpclient.