Include files

closed account (zbREy60M)
Hello, I'm using Visual c++ 2008.

I keep having a problem trying to load custom header files. I just need a good normal random number generator, but all of the header files I attempt to load fail.

In this case I created a custom header file called "BoostRandom.h" and copied all of the contents into it. I then did #include "BoostRandom.h" in my program.
Upon attempting to compile the program I got this error:

fatal error C1083: Cannot open include file: 'boost/config/no_tr1/cmath.hpp': No such file or directory

I even went into tools>options>vc++ directories>headers and then added the folder that the header file was in.

What do?
In this case I created a custom header file called "BoostRandom.h" and copied all of the contents into it.

The contents of what?

I even went into tools>options>vc++ directories>headers and then added the folder that the header file was in.

You're supposed to add the folder the boost directory is in.
closed account (zbREy60M)
The code of the header file that I copied from here: http://www.boost.org/doc/libs/1_32_0/boost/random/uniform_int.hpp

What do you mean by adding the folder with the "boost directory". What is that? Sorry for seeming stupid, I'm teaching this myself and there really isn't a lot of free information out there that goes through this type of stuff.
That's the wrong way to do it. You're supposed to download the boost libraries from here

http://www.boost.org/users/download/

and then follow the instructions here

http://www.boost.org/doc/libs/1_46_1/more/getting_started/windows.html
Topic archived. No new replies allowed.