I just started writing a small application in C++ using Visual Studio C++ 2008 Express. I installed the Boost Library using the Windows installer. While compiling the program I get the following error :
Compiling…
stdafx.cpp
Compiling…
websave.cpp
GoogleAuthenticate.cpp
Generating Code…
Compiling manifest to resources…
Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
Copyright (C) Microsoft Corporation. All rights reserved.
Linking…
LINK : fatal error LNK1104: cannot open file ‘libboost_system-vc90-mt-gd-1_38.lib’
// GoogleAuthenticate.h
#pragma once #include <boost/asio.hpp> class GoogleAuthenticate { public: GoogleAuthenticate(void); virtual ~GoogleAuthenticate(void); };
// GoogleAuthenticate.cpp
#include 'StdAfx.h' #include 'GoogleAuthenticate.h' GoogleAuthenticate::GoogleAuthenticate(void) { } GoogleAuthenticate::~GoogleAuthenticate(void) { }
// websave.cpp
#include 'stdafx.h' #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { cout << 'hello' << endl; return 0; }
I checked the boost/boost-1.38/lib folder and the libboost_system-vc90-mt-gd-1_38.lib is present there. Also added the path in ‘Additional Include Directories’ in Configuration Properties of the project.
Is there anything that is being missed here ?
Forgot to add this : In Configuration Properties > Linker > Additional Library Directories, enter the path to the Boost binaries, e.g. C:\Program Files\boost\boost_1_38_0\lib.
Should have RTFM. http://www.boost.org/doc/libs/1_36_0/more/getting_started/windows.html#link-from-within-the-visual-studio-ide
Fixed.