+1  A: 

The error you have posted complains about file libboost_system-vc90-mt-gd-1_37.lib, but in the directory you have only libboost_*file*system-vc90-mt-gd-1_37.lib, right?

Look for libboost_system-vc90-mt-gd-1_37.lib. If you find it, add the corresponding directory to the library search path. If you don't find it, see if you have boost_system-vc90-mt-gd-1_37.lib instead (like I do), and try copying that to the desired filename.

Pukku
Yes, I do have libboost_system-vc90-mt-gd-1_37.lib. As I said, it is located in <i>C:\Program Files\boost\boost_1_37_0\libs\filesystem\build\msvc-9.0express\debug\link-static\threading-multi</i>.
Scott
Well, you did not really say that you do have a file with this specific name. But ok, it's something else then...
Pukku
I'm sorry for the lack of clarity. This is what I meant when I said "It is the exact directory that the lib file resides in," yet I suppose it wasn't until later in the post that I named the file that the linker was looking for.
Scott
I believe link-static should end up with sgd in the file name, but you have just gd. However, I cannot tell how this could help :(
Pukku
I added a screen shot of the directory.
Scott
You were right! I misread the directory listed in the "Search Results" in Windows. The file is actually located in C:\Program Files\boost\boost_1_37_0\libs\<b>system</b>\build\msvc-9.0express\debug\link-static\threading-multi! This caused me to accidentally lie about where the file resided.
Scott
The screen shot reveals my mistake. I added the correct directory and the project links as expected! Doh! Thank you.
Scott
I guess my intuition caused my to see filesystem rather than system. After all, filesystem seems like the most appropriate directory.
Scott
Seeing as how this is just a silly mistake, should I delete this topic? If not, should I modify my post to correct the misinformation? After all, the post is more misleading than helpful.
Scott
I would probably close as not relevant anymore.
Pukku
+1  A: 

The bjam command line should have built all versions of all libraries. Still, when you build with

bjam --build-dir="C:\Program Files\boost\build-boost" --toolset=msvc --build-type=complete stage

(note the stage at the end) all libraries are copied to a common libs/ folder, so that MSVC's autolinking feature works when you only add this libs/ folder to your library path.

I do not know if bjam without stage still copies all those files to a single folder. If not, execute such a stage build to do this. If they are, well, sorry, configuration seems correct, maybe a minor typing error somewhere?

gimpf
I am aware of the additional <b>stage</b> keyword. I opted to leave this out of my question, for when I used this, it simply created a directory called <i>stage</i> in <i>C:\Program Files\boost\boost_1_37_0</i>. The directory contained a folder called <i>lib</i>, which contained a bunch of the...
Scott
...same lib files. Perhaps I should tell Visual C++ to look in this directory? As far as I can tell, these are the same lib files that were located in <i>C:\Program Files\boost\build-boost\boost\bin.v2\libs</i>.
Scott
Ah! Now I see your point. I was unaware that Filesystem relied on multiple libraries and now see the convenience of the stage/lib directory. These are, in fact, copies of all of lib files located in one place for convenience's sake. Thank you. I'm sorry I misunderstood you to begin with.
Scott
+2  A: 

boost::filesystem is dependent on boost::system, so you need both paths.

Part of the problem is you're using the boost libs out of the build directories instead of the install directory (the boost build process should create both). The install/lib directory has all the libs so you only need to specify one path.

The boost build process builds each library in its own directory. At the end it copies all those .lib files into one common lib directory.

Since you didn't specify an install directory as part of your build command (with --prefix=...), I believe the default is C:\Boost. Check to see if that directory is there and if so use C:\boost\include\ boost-1_37 for your include path and C:\boost\lib for your library path.

Ferruccio
Are you talking about the bjam command? I did supply a directory. I have no directory called "C:\boost." I copied the /libs directory generated in the specified "build-boost" directory to the existing /libs directory under boost_1_37_0.
Scott
You were right about it needing the system lib though. I commented about this in Pukku's answer. I misread system as filesystem. So, it needs both? Perhaps this is why I got confused. However, I thought I removed the path to the filesystem lib when I replaced it with the system lib. I will...
Scott
...have to double-check.
Scott
+5  A: 

Ferruccio's answer contains most of the insight. However, Pukku made me realize my mistake. I am posting my own answer to give a full explanation. As Ferruccio explained, Filesystem relies on two libraries. For me, these are:

  • libboost_system-vc90-mt-gd-1_37.lib
  • libboost_filesystem-vc90-mt-gd-1_37.lib

I must not have noticed that when I supplied the directory for libboost_filesystem-vc90-mt-gd-1_37.lib, the error output changed from

fatal error LNK1104: cannot open file 'libboost_filesystem-vc90-mt-gd-1_37.lib'

to

fatal error LNK1104: cannot open file 'libboost_system-vc90-mt-gd-1_37.lib'

Causing me to think that the error was persisting. This lead me to post some rather inaccurate information. Also, after reading that Filesystem requires two libraries, I now see the significance of the keyword stage for the bjam command. Supplying

bjam --build-dir="C:\Program Files\boost\build-boost" --toolset=msvc --build-type=complete stage

Causes bjam to place an additional directory, aptly named stage, in the boost_1_37_0 directory. This folder contains a folder named /lib, which has copies of all of the lib files in one place. This is convenient for Visual C++ because you can supply it with this single directory and it will take care of all of the dependencies.

Scott
I see. I always build with the install keyword instead of stage, the results are different.
Ferruccio
+1  A: 

I had this same problem, what you need to do is add the "lib" directory under the top level boost folder to the library path in Visual C++.

This most definitely solved the issue for me.

Tyler Brock
Yes. This fixed it for me as well. I had to copy "libboost_unit_test_framework-vc90-mt-1_43.lib" and "libboost_unit_test_framework-vc90-mt-gd-1_43.lib" into the "lib" subdirectory in the QuantLib directory (thats the only one it needs). I also had to copy the header files over in directory "boost" to stop it complaining about missing header files. For some reason, I also had to change the build to "Debug" (from "Debug (static)") because I did not have the -sgd- libraries built by default.
Gravitas
+1  A: 

May I ask what the "gd" in the filename ~-vc90-mt-gd-1_37.lib stands for? Thanks.

I would like to find out the same thing and found several people looking for the same thing so I added a question:http://stackoverflow.com/questions/2715164/how-can-i-decode-the-boost-library-naming
Sorin Sbarnea
The non-gd version is Release, the -gd version is debug.
Gravitas