#2897 closed Bugs (fixed)
asio is not header-only on MSVC
Reported by: | Owned by: | chris_kohlhoff | |
---|---|---|---|
Milestone: | Boost 1.39.0 | Component: | asio |
Version: | Boost 1.38.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The boost documentation claims that asio is a header-only library. However, it seems like it may have non-header-only dependencies. If one even includes the asio header, on Visual Studio 2008 Express edition you get the following linker error:
LINK : fatal error LNK1104: cannot open file 'libboost_system-vc90-mt-gd-1_38.lib'
The test program I used:
#include <iostream> #include <string> #include <boost/asio.hpp> using boost::asio::ip::tcp; int main() { return 0; }
Change History (6)
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
You should also change 'autolink' to true then, since boost.system is autolinking. The only reason I got the error was because I didn't have any of the libraries compiled.
comment:3 by , 12 years ago
Is this still an issue? I think this is a documented requirement of Boost.Asio even in other platforms. Should this be marked wontfix
?
comment:4 by , 12 years ago
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Closing as website now appears to contains this information.
comment:6 by , 11 years ago
Hi, I have included the Boost libraries in VS2008 project, and used the following, #include <asio.hpp> but the it showed error as fatal error C1083: Cannot open include file: 'boost/asio/basic_datagram_socket.hpp': No such file or directory. even though the path is a valid path and all .hpp files are present.
Replying to dustin@…:
The boost documentation claims that asio is a header-only library. However, it seems like it may have non-header-only dependencies. If one even includes the asio header, on Visual Studio 2008 Express edition you get the following linker error:
LINK : fatal error LNK1104: cannot open file 'libboost_system-vc90-mt-gd-1_38.lib'
The test program I used:
#include <iostream> #include <string> #include <boost/asio.hpp> using boost::asio::ip::tcp; int main() { return 0; }
Fixed in [52048],[52049]