0

This is my first test using Boost (1.5.3). I made an example with FileSystem class.

I think I've installed successfully the binary distribution, i.e., run bootstrap.bat and b2.exe to create headers & libraries in the installed folder.

if I'm correct, there is no dll lib, just static libraries & header files which I've pointed to in VS2008 project configuration.

I go compile and got this:

Error   1   fatal error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-gd-1_53.obj'    test_filesystem test_filesystem

what type of error is this? I think the compiler already sees the required files & libs

Thanks

Edit 01:

I originally added the wrong lib name (lack of ".lib"), I've correted it but now it gets "Error 15 fatal error LNK1104: cannot open file 'libboost_filesystem-vc90-mt-gd-1_53.lib' test_filesystem test_filesystem"

Do I put the library name correctly? -> libboost_filesystem-vc90-mt-gd-1_53.lib? I normally put library name like this, and I'm sure I've added the right path to this static lib

TSL_
  • 2,049
  • 3
  • 34
  • 55
  • 1
    "I think the compiler already sees" -> have you verified that? – Bartek Banachewicz Feb 27 '13 at 13:34
  • I right-click in the code, open the header and it shows. And there is no external linking error here which mostly shows when no static lib is found – TSL_ Feb 27 '13 at 13:41
  • The error you got is an error shown when no static lib is found. I don't get you. – Bartek Banachewicz Feb 27 '13 at 13:44
  • I normally see "unresolved external symbol... funcA, funcB,....". Here it shows "..libname.obj" which is different. Secondly, I've pointed the library directory, and the library name already. it is all, isn't it? – TSL_ Feb 27 '13 at 13:50
  • 1
    I don't know. Turn on the linker debug output and verify. – Bartek Banachewicz Feb 27 '13 at 13:55
  • how silly! my library name lacks of ".lib". But now it comes with the LNK2005 (unresolved external symbol) and it says "Error 15 fatal error LNK1104: cannot open file 'libboost_filesystem-vc90-mt-gd-1_53.lib' test_filesystem test_filesystem" -> do I put the library name correctly? -> libboost_filesystem-vc90-mt-gd-1_53.lib? I normally put library name like this – TSL_ Feb 27 '13 at 14:02
  • 1
    boost links itself in strange ways. – Bartek Banachewicz Feb 27 '13 at 14:08

1 Answers1

0

Ok,

I've now solved the problem. Partly, it is from the hint "boost links itself"

I installed boost 1.5.3 which includes all "libxx-vc100-xx-1_53.lib" and these libs are intended to use for VS2010 (vc10) compiler.

I didn't notice this and compiled my example in VS2008 (vc9) and boost/compiler something links automatically to vc9 libraries which are not available.

=> I solved it by compiling the same project in VS2010 and finally DONE

TSL_
  • 2,049
  • 3
  • 34
  • 55