Repository navigation
Description
crow_all.h:3353: error: ‘boost::asio::ip::tcp::socket’ {aka ‘class boost::asio::basic_stream_socketboost::asio::ip::tcp’} has no member named ‘get_io_service’
main.cpp:1:
crow_all.h: In member function ‘boost::asio::io_service& crow::SocketAdaptor::get_io_service()’:
crow_all.h:3353:28: error: ‘boost::asio::ip::tcp::socket’ {aka ‘class boost::asio::basic_stream_socketboost::asio::ip::tcp’} has no member named ‘get_io_service’
3353 | return socket_.get_io_service();
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-10ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
cmake version 3.16.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
#include "crow_all.h"
##
int main()
{
crow::SimpleApp app;
CROW_ROUTE(app, "/")([](){
return "Hello world";
});
app.port(18080).multithreaded().run();
}
Activity
mrozigor commentedon Sep 8, 2020
#374 (comment)
frsauvage commentedon Nov 15, 2020
Hi,
Same on centos8 with latest crow_all.hpp (ninja error):
source:
meson.build:
Regards,
..Francine
The-EDev commentedon Nov 15, 2020
@frsauvage This version of crow is incompatible with
boost 1.70 or later, you'll need to use a lower version.If you'd like a version compatible with 1.70 or later, take a look at this.
Note: regarding the
meson.build, the boost dependency is absolutely required, crow will not run without boost. I'm not sure how meson works but I thought I should point it out.frsauvage commentedon Nov 16, 2020
Hi @The-EDev, thanks,
That's the point. I didn't notice that incompatibility before.
I should use a lower version,
Regards,
asciphx commentedon Jun 22, 2021
@frsauvage You can change socket_adaptors.hpp
and
Merge pull request ipkn#384 from CrowCpp/crow-features
mwycliff0001 commentedon Nov 26, 2022
@The-EDev
It worked. Thank you very much!
For clarification, here is what I did in order to get the helloworld example to build and run properly:
You should see a plain text html 'Hello World' in the browser window.
If you are running this on Ubuntu 20-or-higher ( I'm running on Ubuntu 20.04),
make sure that you already have these dependencies before building/running:
sudo apt-get install build-essential libboost-dev libboost-system-dev libasio-dev
sudo apt install libboost-system1.71-dev # OR WHICHEVER one is the latest version
Just for reference, Igor Mróz was the most recent contributor when I wrote this comment.
Igor Mróz
Nov 8, 2022
Merge pull request CrowCpp/Crow#560 from okaestne/fix-memleaks