Opened 14 years ago

Closed 11 years ago

Last modified 11 years ago

#2897 closed Bugs (fixed)

asio is not header-only on MSVC

Reported by: dustin@… 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 Daniel James, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in [52048],[52049]

comment:2 by dustin@…, 14 years ago

Resolution: fixed
Status: closedreopened

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 anonymous, 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 Daniel James, 12 years ago

(In [67172]) More flexible link description in library list.

So that Asio can be more accurately described. Refs #2897.

comment:5 by chris_kohlhoff, 11 years ago

Resolution: fixed
Status: reopenedclosed

Closing as website now appears to contains this information.

in reply to:  description comment:6 by anonymous, 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;
}
Note: See TracTickets for help on using tickets.