www.digitalmars.com         C & C++   DMDScript  

c++.beta - DMC 8.49.1 lib / Link faliures with Boost.test

reply Arjan <arjan ask.me> writes:
Walter,

One of the boost.test problems is with linking a lib. The creation of 
the lib triggers this warning:
Warning: Public 
'?char_type ?1??print_escaped unit_test boost  YAXAAV?$basic_ostream std DV?$char_traits std D 1  std  V?$basic_
cstring unit_test boost _OD 23  Z23 4V?$fixed_mapping unit_test boost DPBDU?$le
s std D std   23 A' 
already in library, redefinition ignored.

and the link error using the lib this:
Error 1: Previous Definition Different : 
?char_type ?1??print_escaped unit_test boost  YAXAAV?$basic_ostream std DV?$char_
raits std D 1  std  
(void cdecl 
boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_traits::std::D::?1??prin
t_escaped &))

unmangle.exe produces the following for the two mentioned above:

void cdecl 
boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_traits::std::
::?1??print_escaped 
&)
void cdecl 
boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_traits::std::
::?1??print_escaped 
&) (void cdecl 
boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_traits::std::
::?1??print_escaped 
&))

what is ?1?? and ::d::DV?& in the unmangled names?

Do you have any directions in solving these kind of problems?

Arjan
Jul 04 2006
parent reply Walter Bright <newshound digitalmars.com> writes:
Arjan wrote:
 Walter,
 
 One of the boost.test problems is with linking a lib. The creation of 
 the lib triggers this warning:
 Warning: Public 
 '?char_type ?1??print_escaped unit_test boost  YAXAAV?$basic_ostream std DV?$char_traits std
D 1  std  V?$basic_ 
 
 cstring unit_test boost _OD 23  Z23 4V?$fixed_mapping unit_test boost DPBDU?$le
s std D std   23 A' 
 already in library, redefinition ignored.
 
 and the link error using the lib this:
 Error 1: Previous Definition Different : 
 ?char_type ?1??print_escaped unit_test boost  YAXAAV?$basic_ostream std DV?$char_
raits std D 1  std  
 (void cdecl 
 boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_trai
s::std::D::?1??prin 
 
 t_escaped &))
 
 unmangle.exe produces the following for the two mentioned above:
 
 void cdecl 
 boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_traits::std::
::?1??print_escaped 
 &)
 void cdecl 
 boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_traits::std::
::?1??print_escaped 
 &) (void cdecl 
 boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_traits::std::
::?1??print_escaped 
 &))
 
 what is ?1?? and ::d::DV?& in the unmangled names?
 
 Do you have any directions in solving these kind of problems?
 
 Arjan
What it means is the same symbol is defined in two different object files, or twice in the same object module. ?1 means a destructor
Jul 04 2006
parent reply Arjan <arjan ask.me> writes:
Walter Bright wrote:
 Arjan wrote:
 Walter,

 One of the boost.test problems is with linking a lib. The creation of 
 the lib triggers this warning:
 Warning: Public 
 '?char_type ?1??print_escaped unit_test boost  YAXAAV?$basic_ostream std DV?$char_traits std
D 1  std  V?$basic_ 

 cstring unit_test boost _OD 23  Z23 4V?$fixed_mapping unit_test boost DPBDU?$le
s std D std   23 A' 
 already in library, redefinition ignored.

 and the link error using the lib this:
 Error 1: Previous Definition Different : 
 ?char_type ?1??print_escaped unit_test boost  YAXAAV?$basic_ostream std DV?$char_
raits std D 1  std  
 (void cdecl 
 boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_trai
s::std::D::?1??prin 

 t_escaped &))

 unmangle.exe produces the following for the two mentioned above:

 void cdecl 
 boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_traits::std::
::?1??print_escaped 
 &)
 void cdecl 
 boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_traits::std::
::?1??print_escaped 
 &) (void cdecl 
 boost::unit_test::?1??print_escaped::char_type(basic_ostream<>::d::DV?$char_traits::std::
::?1??print_escaped 
 &))

 what is ?1?? and ::d::DV?& in the unmangled names?

 Do you have any directions in solving these kind of problems?

 Arjan
What it means is the same symbol is defined in two different object files, or twice in the same object module.
Yes I know. But how do I get back to the original definition. The (un)mangled ones above do not seem to exist in this form in the source code. They probably are generated by the compiler and somehow the same definition is produced twice.
 
 ?1 means a destructor
Are both destructors? How should one read such (un(mangled)lines? boost -> namespace unit_test -> namespace ?1 -> destructor ?? -> .. print_escaped::char_type -> ?? Arjan
Jul 04 2006
parent reply Walter Bright <newshound digitalmars.com> writes:
Arjan wrote:
 Walter Bright wrote:
 What it means is the same symbol is defined in two different object 
 files, or twice in the same object module.
Yes I know. But how do I get back to the original definition. The (un)mangled ones above do not seem to exist in this form in the source code. They probably are generated by the compiler and somehow the same definition is produced twice.
When things look that complicated, I never even bother trying to figure it out. I just start whacking the source code down to simplify it.
 ?1 means a destructor
Are both destructors? How should one read such (un(mangled)lines? boost -> namespace unit_test -> namespace ?1 -> destructor ?? -> .. print_escaped::char_type -> ??
?$ means the start of a template name followed by the template arguments. ?? means an operator overload. ?!? means a scoped name
Jul 04 2006
parent Arjan <arjan ask.me> writes:
Walter Bright wrote:
 Arjan wrote:
 Walter Bright wrote:
 What it means is the same symbol is defined in two different object 
 files, or twice in the same object module.
Yes I know. But how do I get back to the original definition. The (un)mangled ones above do not seem to exist in this form in the source code. They probably are generated by the compiler and somehow the same definition is produced twice.
When things look that complicated, I never even bother trying to figure it out. I just start whacking the source code down to simplify it.
 ?1 means a destructor
Are both destructors? How should one read such (un(mangled)lines? boost -> namespace unit_test -> namespace ?1 -> destructor ?? -> .. print_escaped::char_type -> ??
?$ means the start of a template name followed by the template arguments. ?? means an operator overload. ?!? means a scoped name
Well this helps, maybe this should be in the unmangle.exe manual somewhere. I already had a strong feeling a templated stream operator overload is causing this. Will investigate it a little further.... Thanks, Arjan
Jul 04 2006