Visual studio 2008 problem with linker or compiler (depending on release or debug version)...

Hi, I have installed boost libraries and headers using the installer from: http://www.boostpro.com/download Then in visual studio I create an empty c++ project and added the chat_server.cpp and chat_message.hpp code from http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/examples.html (I wish there was a code download link by the way, I struggled some because of some characters introduced in copy paste) Then I added "C:\Program Files\boost\boost_1_38" to include directories and "C:\Program Files\boost\boost_1_38\lib" to additional library directories (similar to description in the last two sections of this tutorial: http://blog.emptycrate.com/node/421 , but without property sheets, only on project properties.) Now the errors. If I try to build a release version it says: .\chat_server.cpp(17) : fatal error C1083: Cannot open include file: 'boost/bind.hpp': No such file or directory but If I try to build a debug version it says: LINK : fatal error LNK1104: cannot open file 'libboost_system-vc90-mt-gd-1_38.lib' I have a 'libboost_system-vc90-mt-*s*gd-1_38.lib' not 'libboost_system-vc90-mt-gd-1_38.lib' in my lib folder... Thanks in advance, Ozgur (Oscar) Ozturk www.DrOzgur.com +1 (614) 805-4370

AMDG Ozgur Ozturk wrote:
I have installed boost libraries and headers using the installer from: http://www.boostpro.com/download
Then in visual studio I create an empty c++ project and added the chat_server.cpp and chat_message.hpp code from http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/examples.html (I wish there was a code download link by the way, I struggled some because of some characters introduced in copy paste)
Then I added "C:\Program Files\boost\boost_1_38" to include directories and "C:\Program Files\boost\boost_1_38\lib" to additional library directories (similar to description in the last two sections of this tutorial: http://blog.emptycrate.com/node/421 , but without property sheets, only on project properties.)
Now the errors. If I try to build a release version it says: .\chat_server.cpp(17) : fatal error C1083: Cannot open include file: 'boost/bind.hpp': No such file or directory
It sounds like you only added the include paths to the debug build.
but If I try to build a debug version it says: LINK : fatal error LNK1104: cannot open file 'libboost_system-vc90-mt-gd-1_38.lib'
I have a 'libboost_system-vc90-mt-*s*gd-1_38.lib' not 'libboost_system-vc90-mt-gd-1_38.lib' in my lib folder...
You need either to install the libraries without static runtime, or build using the static CRT. (Properties->Configuration Properties->C/C++->Code Generation->Runtime Library) In Christ, Steven Watanabe
participants (2)
-
Ozgur Ozturk
-
Steven Watanabe