List Info

Thread: Autolinking for unit-test not working for GCC 4.1 x86 Linux




Autolinking for unit-test not working for GCC 4.1 x86 Linux
user name
2006-11-22 09:57:46
On 11/22/06, Vladimir Prus <ghostcs.msu.su> wrote:
>
> Doh, this should be:
>
>         use-project /boost :
<path-to-boost-source-tree> ;
>
> Sorry,
> Volodya
>

Okay. Thanks.

However... It now gives me a different error now.

error: Unable to find file or target named
error:     '/boost//boost_unit_test_framework'
error: referred from project at
error:     '.'

I have it set up like this:

use-project /boost : /usr/local/boost ;
unit-test my_test : my_test.cpp
/boost//boost_unit_test_framework ;

Am I missing something else?

-- 
Dean Michael C. Berris
C++ Software Architect
Orange and Bronze Software Labs, Ltd. Co.
web: http://software.
orangeandbronze.com/
email: deanorangeandbronze.com
mobile: +63 928 7291459
phone: +63 2 8943415
other: +1 408 4049532
blogs: http://mikhailberis.
blogspot.com http://3w-agility.blog
spot.com
http://cplusplus-s
oup.blogspot.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Autolinking for unit-test not working for GCC 4.1 x86 Linux
user name
2006-11-22 13:31:13
Found it.

On 11/22/06, Dean Michael Berris <mikhailberisgmail.com> wrote:
>
> use-project /boost : /usr/local/boost ;
> unit-test my_test : my_test.cpp
/boost//boost_unit_test_framework ;
>

Should have been:

use-project /boost : /usr/local/boost ;
unit-test my_test : my_test.cpp /boost//unit_test_framework
;

I also noticed that the auto-tests should have a
`<link>static`
requirement to have them built and run successfully.

Thanks for the tips!

-- 
Dean Michael C. Berris
C++ Software Architect
Orange and Bronze Software Labs, Ltd. Co.
web: http://software.
orangeandbronze.com/
email: deanorangeandbronze.com
mobile: +63 928 7291459
phone: +63 2 8943415
other: +1 408 4049532
blogs: http://mikhailberis.
blogspot.com http://3w-agility.blog
spot.com
http://cplusplus-s
oup.blogspot.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Autolinking for unit-test not working for GCC 4.1 x86 Linux
user name
2006-11-22 13:41:55
Hi Dean !

On Wednesday 22 November 2006 14:31, Dean Michael Berris
wrote:

> I also noticed that the auto-tests should have a
`<link>static`
> requirement to have them built and run successfully.

For shared linking, please add #define BOOST_TEST_MAIN just
_before_ you 
include the first Boost.Test header. This should create the
needed 
main() or you.


Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold  ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57  ! Verkehrs- und Eisenbahnwesen
mbH  
* fax  : ++49 511 262926 99  ! Lister Straße 15
* juergen.hunoldivembh.de   ! www.ivembh.de

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Autolinking for unit-test not working for GCC 4.1 x86 Linux
user name
2006-11-22 14:05:48
Hi Juergen!

On 11/22/06, Juergen Hunold <hunoldivembh.de> wrote:
> Hi Dean !
>
> On Wednesday 22 November 2006 14:31, Dean Michael
Berris wrote:
>
> > I also noticed that the auto-tests should have a
`<link>static`
> > requirement to have them built and run
successfully.
>
> For shared linking, please add #define BOOST_TEST_MAIN
just _before_ you
> include the first Boost.Test header. This should create
the needed
> main() or you.
>

I already have `#define BOOST_AUTO_TEST_MAIN ` just before
including
the Boost.Test header -- this I think is a remnant of Boost
1.33.1's
requirements. Is this a deprecation of the
BOOST_AUTO_TEST_MAIN macro,
or is this a bug in Boost.Test or Boost.Build?

-- 
Dean Michael C. Berris
C++ Software Architect
Orange and Bronze Software Labs, Ltd. Co.
web: http://software.
orangeandbronze.com/
email: deanorangeandbronze.com
mobile: +63 928 7291459
phone: +63 2 8943415
other: +1 408 4049532
blogs: http://mikhailberis.
blogspot.com http://3w-agility.blog
spot.com
http://cplusplus-s
oup.blogspot.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Autolinking for unit-test not working for GCC 4.1 x86 Linux
user name
2006-11-22 14:28:43
Hi Dean !

On Wednesday 22 November 2006 15:05, Dean Michael Berris
wrote:
> Hi Juergen!

> > For shared linking, please add #define
BOOST_TEST_MAIN just
> > _before_ you include the first Boost.Test header.
This should
> > create the needed main() or you.
>
> I already have `#define BOOST_AUTO_TEST_MAIN ` just
before including
> the Boost.Test header -- this I think is a remnant of
Boost 1.33.1's
> requirements. Is this a deprecation of the
BOOST_AUTO_TEST_MAIN
> macro, or is this a bug in Boost.Test or Boost.Build?

That depends )
Well, the documentation is not up-to-date, so I think the
best way is to 
consider BOOST_AUTO_TEST_MAIN as deprecated. 

At least
> // Setup Boost Auto-Testing
> #define BOOST_TEST_MAIN
> #include <boost/test/unit_test.hpp>

works just fine for me. )

The question _how_ to handle the platform specific issues
(Win32 mostly) 
is going on right now. The best solution is to link
statically when not 
using BOOST_AUTO_TEST at the moment.

Yours,

Jürgen
-- 
* Dipl.-Math. Jürgen Hunold  ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57  ! Verkehrs- und Eisenbahnwesen
mbH  
* fax  : ++49 511 262926 99  ! Lister Straße 15
* juergen.hunoldivembh.de   ! www.ivembh.de

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Autolinking for unit-test not working for GCC 4.1 x86 Linux
user name
2006-11-22 16:39:17
Hi Juergen!

On 11/22/06, Juergen Hunold <hunoldivembh.de> wrote:
>
> On Wednesday 22 November 2006 15:05, Dean Michael
Berris wrote:
> >
> > I already have `#define BOOST_AUTO_TEST_MAIN `
just before including
> > the Boost.Test header -- this I think is a remnant
of Boost 1.33.1's
> > requirements. Is this a deprecation of the
BOOST_AUTO_TEST_MAIN
> > macro, or is this a bug in Boost.Test or
Boost.Build?
>
> That depends )
> Well, the documentation is not up-to-date, so I think
the best way is to
> consider BOOST_AUTO_TEST_MAIN as deprecated.
>

Okay, I should try migrating the old test code that relied
on:

  #define BOOST_AUTO_TEST_MAIN
  #include <boost/test/auto_unit_test.hpp>

To be able to avoid the BOOST_AUTO_TEST_MAIN macro in the
future.

> At least
> > // Setup Boost Auto-Testing
> > #define BOOST_TEST_MAIN
> > #include <boost/test/unit_test.hpp>
>
> works just fine for me. )
>
> The question _how_ to handle the platform specific
issues (Win32 mostly)
> is going on right now. The best solution is to link
statically when not
> using BOOST_AUTO_TEST at the moment.
>

So in 1.34, I shouldn't have to worry about using
<boost/test/auto_unit_test.hpp> for auto-unit tests,
and just use
<boost/test/unit_test.hpp> instead?

In my case the linking doesn't bother me too much -- the
code is still
being built with 1.33.1 anyway, I'm just experimenting with
building
it with RC_1_34_0 and the new boost-build system. At any
rate, I'm
trying to make changes to the build files that will satisfy
both 1.34
and 1.33 and so far it's working out pretty well
(considering that
1.33's bbv2 implementation is pretty crippled compared to
the latest
in RC1.34).

Thanks for the tips!

-- 
Dean Michael C. Berris
C++ Software Architect
Orange and Bronze Software Labs, Ltd. Co.
web: http://software.
orangeandbronze.com/
email: deanorangeandbronze.com
mobile: +63 928 7291459
phone: +63 2 8943415
other: +1 408 4049532
blogs: http://mikhailberis.
blogspot.com http://3w-agility.blog
spot.com
http://cplusplus-s
oup.blogspot.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
[1-6]

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