views:

323

answers:

2

I used this guide to rebuild the boost library in VC++6 under windows XP. But is having problems trying to include the header files. By default, the boost library makes use of point 1 as follows to declare the header files. But if I used point 1, I get "fatal error C1083: Cannot open include file...". I tried using point 2 to declare and it seem to work but all the header files referenced internally by point 2 will have to be changed. This lead to a cascade of header declaration to be changed which is not realistic.

Did I miss something? What is the correct way of including the header file without errors?

1) #include <boost/interprocess/managed_shared_memory.hpp>  
2) #include "..\boost\interprocess\managed_shared_memory.hpp"
A: 

No offense intended, but does VC++6 not support additional include directories?

It has been a long time since I used VC 6 but I know there has to be a way to say

Look in .. for more include files.

Check your project properties, under C/C++ (assuming the menu system is somewhat similar to newer versions)

Set Additional Include Directories to ..

Charles
+1  A: 

Did you add the boost include path to your project?

If you try to compile your program from Visual Studio you can add extra include paths in the global options (menus: Tools -> Options -> Directories -> Show directories for: Include files). If you will also make use of the compiled boost libraries (e.g. for boost::filesystem), you should add the library path to your setup too.

catchmeifyoutry
I added the include path but now, I get the error"C:\Program Files\Boost\include\boost-1_41\boost/interprocess/interprocess_fwd.hpp(186) : error C2954: template definitions cannot nest". Does this mean that Boost library version 1.41 cannot be used by VC++6?
Lopper
Well, that's a different problem. Maybe you can try to follow this guide to start with something simple that should work:http://www.boost.org/doc/libs/1_41_0/more/getting_started/windows.htmlIt also has some more tips on configuring VS, e.g. sections 4.1 and 6.1.
catchmeifyoutry
The last boost version that supported MSVC6 as a build target was 1.34, I believe. MSVC6 is not a standards-conformant C++ compiler.
Joe
Note that Boost maintains a list of tested compilers for each release, and that VC6 support was dropped several releases ago. Also note that the "Tested Compilers" section of Interprocess library docs does not list VC6.
Bojan Resnik
Lopper