User forums > Help
Installing Asio with Code::blocks
(1/1)
k_goos:
I am trying to install the asio library with Code::Blocks but I will always fail :P
I've downloaded asio at the following link: http://sourceforge.net/projects/asio/files/asio/1.4.8%20%28Stable%29/asio-1.4.8.zip/download
I am using asio-1.4.8
But I think i need to build this library first but that is something that will also not work.
I've somebody can help me please and if you need more information just ask and I will give you. ;D
I've added to the search directories and then compiler the include folder.
Code:
--- Quote ---#include <asio.hpp>
int main()
{
return 0;
}
--- End quote ---
Compiler output:
--- Quote ----------------- Clean: Debug in Network ---------------
Cleaned "Network - Debug"
-------------- Build: Debug in Network ---------------
Compiling: main.cpp
In file included from ..\..\..\Library\asio-1.4.8\include/asio/basic_datagram_socket.hpp:18,
from ..\..\..\Library\asio-1.4.8\include/asio.hpp:18,
from C:\Users\Kevin\Desktop\Dropbox\Programming\C++\CodeBlocks\Network\main.cpp:1:
..\..\..\Library\asio-1.4.8\include/asio/detail/config.hpp:14:28: error: boost/config.hpp: No such file or directory
In file included from ..\..\..\Library\asio-1.4.8\include/asio/basic_io_object.hpp:19,
from ..\..\..\Library\asio-1.4.8\include/asio/basic_socket.hpp:19,
from ..\..\..\Library\asio-1.4.8\include/asio/basic_datagram_socket.hpp:20,
from ..\..\..\Library\asio-1.4.8\include/asio.hpp:18,
from C:\Users\Kevin\Desktop\Dropbox\Programming\C++\CodeBlocks\Network\main.cpp:1:
..\..\..\Library\asio-1.4.8\include/asio/detail/noncopyable.hpp:19:33: error: boost/noncopyable.hpp: No such file or directory
..\..\..\Library\asio-1.4.8\include/asio/detail/noncopyable.hpp:20:39: error: boost/detail/workaround.hpp: No such file or directory
..\..\..\Library\asio-1.4.8\include/asio/detail/noncopyable.hpp:27:21: error: missing binary operator before token "("
In file included from ..\..\..\Library\asio-1.4.8\include/asio/detail/bind_handler.hpp:19,
from ..\..\..\Library\asio-1.4.8\include/asio/detail/wrapped_handler.hpp:18,
from ..\..\..\Library\asio-1.4.8\include/asio/io_service.hpp:24,
from ..\..\..\Library\asio-1.4.8\include/asio/basic_io_object.hpp:20,
from ..\..\..\Library\asio-1.4.8\include/asio/basic_socket.hpp:19,
from ..\..\..\Library\asio-1.4.8\include/asio/basic_datagram_socket.hpp:20,
from ..\..\..\Library\asio-1.4.8\include/asio.hpp:18,
...
--- End quote ---
gd_on:
The error message indicates that you need to have boost. Have you installed it ? Are boost includes in your C::B paths ?
gd_on
Alpha:
Most components of Boost have dependencies on at least a few other Boost components. Because of this, it is likely you will need to install the full Boost library.
Also note that Boost components expect to be found in a "boost" sub-directory; your folder structure should therefore be such that the asio include becomes:
--- Code: ---#include <boost/asio.hpp>
--- End code ---
k_goos:
Oke thank you for the answer but is it possible to install only the parts that are needed from boost
because it is a big library and else my project will become much lager when I release it.
because i only need the asio ;D
Jenna:
--- Quote from: k_goos on March 18, 2012, 06:34:26 pm ---Oke thank you for the answer but is it possible to install only the parts that are needed from boost
because it is a big library and else my project will become much lager when I release it.
because i only need the asio ;D
--- End quote ---
It's surely possible, but it has nothing to do with C::B.
When you registered in this forum, you accepted our forum rules.
One of the rules says, that not C::B related questions are not allowed here.
Please respect this the next time.
Topic locked !
Navigation
[0] Message Index
Go to full version