List Info

Thread: Using boost.build v2 to build/test application and boost




Using boost.build v2 to build/test application and boost
user name
2006-02-11 19:32:14
Hi!

I'm having problems integrating boost.build v2 with my
application and boost.
What I'm trying to do is to make boost.build in my
application build
automatically what is needed in boost.

I have a test that is like this:

project mintercept/mail/test ;

import testing ;

test-suite mail
  : [ run test.cpp
$(MINTERCEPT_ROOT)/libs/boost/libs/test/build//boost_unit_te
st_framework
]
;

It compiles boost_unit_test_framework, and creates this tree
from the
root of my application:
libs\boost\bin.v2\libs\test\build\msvc-7.1\debug\asy
nch-exceptions-on\link-static
The .lib created is:
boost_unit_test_framework-vc71-d-1_34.lib
But the linker complains:

LINK : fatal error LNK1104: cannot open file
'libboost_unit_test_framework-vc71-
mt-gd-1_34.lib'

What do I do? Should I disable auto linking? If it is so,
how do I do?
Or is the boost.build not building the correct target?

--
Felipe Magno de Almeida

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Using boost.build v2 to build/test application and boost
user name
2006-02-13 09:21:37
> I'm having problems integrating boost.build v2 with my
application and
> boost. What I'm trying to do is to make boost.build in
my application build
> automatically what is needed in boost.
>
> I have a test that is like this:
>
> project mintercept/mail/test ;
>
> import testing ;
>
> test-suite mail
>
>   : [ run test.cpp
>
>
$(MINTERCEPT_ROOT)/libs/boost/libs/test/build//boost_unit_te
st_framework
> ]
> ;
>
> It compiles boost_unit_test_framework, and creates this
tree from the
> root of my application:
>
libs\boost\bin.v2\libs\test\build\msvc-7.1\debug\asy
nch-exceptions-on\link-
>static The .lib created is:
boost_unit_test_framework-vc71-d-1_34.lib
> But the linker complains:
>
> LINK : fatal error LNK1104: cannot open file
> 'libboost_unit_test_framework-vc71- mt-gd-1_34.lib'

Can you remove the "test.o" file produced from
your "test.cpp" file (or touch 
test.cpp), then run 

    bjam --v2 -n

and post the output? I think the autolinking code thinks
you're building 
multi-thread application, while Boost.Build is building
single-thread 
application.

Can you build and run the following test application
(without linking it to 
anything)?:

    #include <boost/config.hpp>
    #include <stdio.h>
  
   int main()
   {
#if defined(_MT) || defined(__MT__)
       printf("MT build\n");
#else
       printf("ST build\n");
#endif   
   }

? That will help us to get right to the root of the problem.

> What do I do? Should I disable auto linking? If it is
so, how do I do?

You can add <define>BOOST_ALL_NO_LIB=1 to the
target's requirements, and it 
might be good idea anyway, because Boost.Build will link to
the library 
itself, but it will be also desirable to debug the autolink
problem -- just 
in case in future you'd prefer to use autolink for some
reason.

- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )