• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Cannot include file boost.hpp - no such file or directory

Ecstacy

Mothafuckaaa
Joined
Dec 26, 2008
Messages
3,836
Reaction score
108
Location
The Netherlands
Hey,

I'm getting this weird error when I'm trying to compile this source, it keeps telling me that I don't have the boost.hhp file, but I clearly have it.
The boost.hpp file is not inside the folder of the trunk, though I don't think that is the problem since other trunks compile just fine.

error:
Code:
1>------ Build started: Project: tfs, Configuration: Release Win32 ------
1>  otpch.cpp
1>d:\opentibia\server\azeroth source 960\source\otpch.h(34): fatal error C1083: Cannot open include file: 'boost/config.hpp': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Boost.hpp:
Code:
//  Boost config.hpp configuration header file  ------------------------------//

//  (C) Copyright John Maddock 2002. 
//  Use, modification and distribution are subject to the 
//  Boost Software License, Version 1.0. (See accompanying file 
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

//  See http://www.boost.org/libs/config for most recent version.

//  Boost config.hpp policy and rationale documentation has been moved to
//  http://www.boost.org/libs/config
//
//  CAUTION: This file is intended to be completely stable -
//           DO NOT MODIFY THIS FILE!
//

#ifndef BOOST_CONFIG_HPP
#define BOOST_CONFIG_HPP

// if we don't have a user config, then use the default location:
#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG)
#  define BOOST_USER_CONFIG <boost/config/user.hpp>
#endif
// include it first:
#ifdef BOOST_USER_CONFIG
#  include BOOST_USER_CONFIG
#endif

// if we don't have a compiler config set, try and find one:
#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG)
#  include <boost/config/select_compiler_config.hpp>
#endif
// if we have a compiler config, include it now:
#ifdef BOOST_COMPILER_CONFIG
#  include BOOST_COMPILER_CONFIG
#endif

// if we don't have a std library config set, try and find one:
#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus)
#  include <boost/config/select_stdlib_config.hpp>
#endif
// if we have a std library config, include it now:
#ifdef BOOST_STDLIB_CONFIG
#  include BOOST_STDLIB_CONFIG
#endif

// if we don't have a platform config set, try and find one:
#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG)
#  include <boost/config/select_platform_config.hpp>
#endif
// if we have a platform config, include it now:
#ifdef BOOST_PLATFORM_CONFIG
#  include BOOST_PLATFORM_CONFIG
#endif

// get config suffix code:
#include <boost/config/suffix.hpp>

#endif  // BOOST_CONFIG_HPP

I wonder if the problem might be that the config.hhp is not directly inside the boost folder but inside the include folder;
Code:
\tfs-sdk-1.0\boost-1.4.9\include\boost

really hope someone could help me with this!
 
Last edited:
Well the sdk contains all libraries, so that's why it's 104MB :p.

But this is what is inside the batch file;
Code:
setx TFSSDKDir %CD%

so it basically sets the folder you run it in as the TFSSdkDir folder.
 
Mmm, ok. Well i dont know how this should work (if VB can use that variable, etc) then i will tell you how to manually add the boost headers and libraries. BUT if this (the one in your pack) "mode" failed to import boost headers/libs probably it have failed to import the others...

How to install boost to work with visual studio 2010:
WATCH AFTER 3:28~
Compiling and configuring Boost C++ libraries for Visual Studio 2010 - YouTube
Note that in this video he has MANUALLY installed Boost, so the folders might be different from yours. Your "include" folder is "boost_1_45_0" from the video.

How to add boost headers:

  1. Right Click on your project (the one bellow "Solution ~~~~")
  2. Properties > C/C++ > General > Additional Include Directories
  3. Left click on it > Click in the arrow and go <Edit...> > In the new box DOUBLE click in the upper one > Click in the "..." button
  4. Here add the INCLUDE folder from boost (yours is "tfs-sdk-1.0\boost-1.4.9\include") - NOTE that should have a folder named "boost" inside "include" folder
  5. Click Ok (in the Additional Include Directories), then Apply

How to add boost libraries:

  1. In your Project Properties go to Linker > General > Additional Include Directories
  2. Repeat the above "Step 3"
  3. Here add the LIB folder from boost (i dont know where it is in this sdk pack, but should have some folder here "tfs-sdk-1.0\boost-1.4.9\" named "lib" or "libs" or "lib86" something like that)
  4. Ok then Apply

I would expect a lot of errors related to other headers/libs, but who knows... You can use the same steps to add other headers/libs, just follow the same logic (headers in "include" and libs in "lib")
 
Last edited:
Back
Top