Boost logo

Boost Users :

From: Brian Hall (b.hall_at_[hidden])
Date: 2006-09-25 00:27:39


Thanks, but the error message I cited below was only one of many
failures I am capable of generating when linking to my boost libraries.
Yes I do have a function 'init_unit_test_suite'. It is in a file that
seems to compile ok, but then the linker doesn't (always) find it. I am
very confused about how my boost libraries seem to be messing up the
linking process! They also appear to cause the linker not to see the
eXpat library that I use.

Let me return to the heart of my problem (ie, forget the libraries for
now).

When I #include 'unit_test_framework.hpp' in my testing code,
compliation fails and I get the error message (I cannot fix this by
setting /Zm2000 -- and it does not occur with STLPort 4.6.2).

C:\USR\STLPORT-5.0.2\STLPORT\stl/_istream.c(943) : fatal error C1076:
compiler limit : internal heap limit reached; use /Zm to specify a
higher limit
         C:\USR\STLPORT-5.0.2\STLPORT\stl/_istream.c(1188) : see
reference to function template instantiation 'void __cdecl
stlp_std::_M_ignore_buffered(class stlp_std::basic_istream<char,class
stlp_std::char_traits<char> > *,class stlp_std::basic_st
reambuf<char,class stlp_std::char_traits<char> > *,struct
stlp_std::_Is_not_wspace<class stlp_std::char_traits<char> >,struct
stlp_std::_Scan_for_not_wspace<class stlp_std::char_traits<char>
>,bool,bool)' being compiled

Can you offer me any advice about this? If the complier really is too
short of memory, could linking to the libraries possibly get around this
problem?

Thanks

Gennadiy Rozental wrote:
> "Brian Hall" <b.hall_at_[hidden]> wrote in message
> news:4515D22F.7010008_at_irl.cri.nz...
> [...]
>
>>So I decided to build the boost libraries (boost 1_33_1).
>>
>>Unfortunately, now I can't get my testing code to link with these
>>libraries!
>>
>>Could anyone tell me which of the following I should be linking to (I am
>>building in 'release' mode with multithreading)?
>>
>>libboost_unit_test_framework-vc6-mt-gdp-1_33_1.lib
>>libboost_unit_test_framework-vc6-mt-gdp.lib
>>libboost_unit_test_framework-vc6-mt-p-1_33_1.lib
>>libboost_unit_test_framework-vc6-mt-p.lib
>>libboost_unit_test_framework-vc6-mt-sgdp-1_33_1.lib
>>libboost_unit_test_framework-vc6-mt-sgdp.lib
>>libboost_unit_test_framework-vc6-mt-sp-1_33_1.lib
>>libboost_unit_test_framework-vc6-mt-sp.lib
>
>
> There is a page in general boost docs (somewhere abound boost.build docs)
> that explains meaning of all these letters.
>
>
>>In fact, I've tried them all without success.
>>
>>Here is an example error message:
>>
>>libboost_unit_test_framework-vc6-mt-sp-1_33_1.lib(framework.obj) : error
>>LNK2001: unresolved external symbol "class boost::unit_test::test_suite
>>* __cdecl init_unit_test_suite(int,char * * const)"
>>(?init_unit_test_suite@@YAPAVtest_suite_at_unit_test_at_boost@@HQAPAD_at_Z)
>>Release/mst_gum_tree_real_dev.exe : fatal error LNK1120: 1 unresolved
>>externals Error executing link.exe.
>
>
> Do you have this function init_unit_test_suite?
>
>
>
>>Also, I simply removed the #include of unit_test_framework.hpp in my
>>original source code. Is that correct? The remaining includes are:
>>unit_test.hpp and floating_point_comparison.hpp.
>
>
> should be ok.
>
>
>>As an alternative to linking to the libraries, I have tried to include
>>the source files in my project, as suggested in the unit test
>>documentation, but that doesn't work either! The documentation does not
>>appear to be up to date.
>
>
> Yep. That's true, unfortunately.
>
> It should work, once you link with proper library.
>
> Gennadiy


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net