How does Boost Asio work

Started by
2 comments, last by Drew_Benton 13 years, 6 months ago
I'm trying to get Boost Asio to compile on MSV. I followed the instructions to link it from the Boost website, but it still doesn't work. Please help or redirect me to some other kind of instructions.

Advertisement
The instructions are the ones on the Boost web site.
When I follow the instructions, it works fine.
Thus, you're probably not following the instructions correctly.
For us to be able to help you, we need to know, at least, what the exact error messages are that you're getting, and what versions of Windows, Visual C++ and the Platform SDK you are using.
If there are many error messages, copying and pasting the first five are probably a good start.

Of course, it might be that this is a support request that is more appropriate for the Boost support forums proper, rather than gamedev.net, too.
enum Bool { True, False, FileNotFound };
Sorry, I couldn't reply earlier.

I'm using Visual Studios 2008 as my compiler and I'm using boost 1_44_0.
My test code is here

#include <iostream>
#include <boost/array.hpp>
#include <boost/asio.hpp>

using boost::asio::ip::tcp;

int main(int argc, char* argv[])
{

return 0;
}

and I'm getting this kind of error.

fatal error LNK1104: cannot open file 'libboost_system-vc90-mt-gd-1_44.lib'
Your paths to boost are not setup correctly, or you do not have boost correctly built or installed.

To check your paths in VS 2008, go to Tools->Options. Then the following two screenshots show what yours should look like:



Your headers is probably setup correctly since you reach the linking stage, so check the libs folder. I built my boost, so the stage folder has the final files compiled. If you installed boost from a Windows package from boost computing, then you want to add that lib path instead.

Now, if the paths are correct, then you do not have the "Multithreaded DLL" versions of boost installed. You can try to switch to static by going to Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library and use "Multi-threaded (/MT)" for release and "Multi-threaded Debug (/MTd)" for debug. You will need to clean then rebuild your project after making those changes.

If you still get another linker error, your paths are still incorrect or you simply do not have any boost libraries installed. Refer back to the place you downloaded/installed boost from to get all of the libraries as you are missing some core ones.

This topic is closed to new replies.

Advertisement