Hi there,
I had the same link problem with
LINK : fatal error LNK1104: cannot open file 'libboost_serialization-
vc100-mt-1_44.lib'
and found your post.
I upgraded one of my projects which uses VS2005 and boost1.39 to
VS2010 and boost1.44
and then suddenly got this error.
Of course, I never use the serialization lib in my code.
Did anyone find any solution to this problem?
Currently, I uses a dummy lib file with the name
libboost_serialization-vc100-mt-1_44.lib
and the compilation passes.
But I am really nervous about using this solution.
Thank you.
Alex Zhou
On Sep 8, 10:02 am, "
joris.mo...@gmail.com" <
joris.mo...@gmail.com>
wrote:
> Thanks for your report.
>
> I am rather puzzled by it: libDAI doesn't use the boost serialization
> lib at all...
> Maybe this is some Windows / Visual Studio 2010 specific issue,
> or something specific to boost version 1.44.0.
>
> > I was concerned about the C4146 warnings and indeed quite a few of the tests fail.
> > tests/unit/factor_test.exe
> > Running 12 test cases...
> > EXCEPTION: Assertion "x.size() == vars.nrStates()" failed
> > EXCEPTION: Assertion "_vs.nrStates() == _p.size()" failed
> > EXCEPTION: Assertion "vars >> _vs" failed
> > EXCEPTION: Assertion "vars >> _vs" failed
> > EXCEPTION: Assertion "f.vars().size() == 2" failed
> > EXCEPTION: Assertion "n.states() == 2" failed
> > EXCEPTION: Assertion "n1.states() == 2" failed
> > EXCEPTION: Assertion "state < v.states()" failed
> > EXCEPTION: Assertion "state < vs.nrStates()" failed
>
> I am sorry for the confusion: output like "EXCEPTION: Assertion ...
> failed" do not
> mean that the unit tests fail. If the Makefile runs all unit tests and
> finally outputs
> "libDAI built successfully!", then this means that all unit tests
> passed.
>
> Best wishes,
> Joris
On Sep 8, 8:27 am, Edi <
edi_b...@yahoo.com> wrote:
> Trying to build as instructed complains about boost\serialization lib.
> So I added it to bjam
>
> bjam --with-graph --with-math --with-program_options --with-test --
> with-serialization link=static runtime-link=shared
>
> It still could not find it so I had to make some changes to the
> Makefile (see the diff at the end) in order to get it to work. I was
> concerned about the C4146 warnings and indeed quite a few of the tests
> fail.
>
> tests/unit/factor_test.exe
> Running 12 test cases...
> EXCEPTION: Assertion "x.size() == vars.nrStates()" failed
> EXCEPTION: Assertion "_vs.nrStates() == _p.size()" failed
> EXCEPTION: Assertion "vars >> _vs" failed
> EXCEPTION: Assertion "vars >> _vs" failed
> EXCEPTION: Assertion "f.vars().size() == 2" failed
> EXCEPTION: Assertion "n.states() == 2" failed
> EXCEPTION: Assertion "n1.states() == 2" failed
> EXCEPTION: Assertion "state < v.states()" failed
> EXCEPTION: Assertion "state < vs.nrStates()" failed
>
> I am using Visual Studio 2010.
>
> ---------------------------
>
> testdai.cpp
> C:\libDAI-0.2.7\include\dai/treeep.h(205) : warning C4146: unary minus
> operator
> applied to unsigned type, result still unsigned
> Microsoft (R) Incremental Linker Version 10.00.30319.01
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> /debug
> /out:tests/testdai.exe
> lib/libdai.lib
> "/LIBPATH:c:\Program Files\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB"
> "/LIBPATH:C:\Program Files\Microsoft Visual Studio 10.0\VC\LIB"
> "/LIBPATH:C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib"
> /LIBPATH:C:\boost_1_44_0\stage\lib
> testdai.obj
> LINK : fatal error LNK1104: cannot open file 'libboost_serialization-
> vc100-mt-1_
> 44.lib'
> make: *** [tests/testdai.exe] Error 2
>
> -------------------- FIX ----------------------------
>
> --- C:/libDAI-0.2.7/Makefile_orig Wed Sep 8 09:59:27 2010
> +++ C:/libDAI-0.2.7/Makefile Wed Sep 8 10:12:14 2010
> @@ -199,10 +199,10 @@
> ###########
>
> examples/%$(EE) : examples/%.cpp $(HEADERS) $(LIB)/libdai$(LE)
> - $(CC) $(CCO)$@ $< $(LIBS)
> + $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_PO)
>
> examples/example_sprinkler_gibbs$(EE) : examples/
> example_sprinkler_gibbs.cpp $(HEADERS) $(LIB)/libdai$(LE)
> - $(CC) $(CCO)$@ $< $(LIBS)
> + $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_PO)
>
> examples/example_imagesegmentation$(EE) : examples/
> example_imagesegmentation.cpp $(HEADERS) $(LIB)/libdai$(LE)
> ifdef NEW_CIMG
> @@ -232,7 +232,7 @@
> $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_PO)
> tests/testbbp$(EE) : tests/testbbp.cpp $(HEADERS) $(LIB)/libdai$(LE)
> ifdef WITH_CBP
> - $(CC) $(CCO)$@ $< $(LIBS)
> + $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_PO)
> else
> @echo Skipping $@
> endif
> @@ -264,10 +264,10 @@
> $(CC) $(CCO)$@ $< $(LIBS)
>
> utils/fginfo$(EE) : utils/fginfo.cpp $(HEADERS) $(LIB)/libdai$(LE)
> - $(CC) $(CCO)$@ $< $(LIBS)
> + $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_PO)
>
> utils/uai2fg$(EE) : utils/uai2fg.cpp $(HEADERS) $(LIB)/libdai$(LE)
> - $(CC) $(CCO)$@ $< $(LIBS)
> + $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_PO)
>
> # LIBRARY