www.digitalmars.com         C & C++   DMDScript  

c++.stlsoft - scope_hancle /CLR compilation problem

reply "Cláudio Albuquerque" <0318222801 netcabo.pt> writes:
Hi Mathew,

I'm having some problems when doing a compilation with the CLR switch set.
Although the cases in that this type of compilation are necessary are rare I 
do need to support them.
So do you have any ideas?

Thanks
Cláudio Albuquerque

Compilation Ouput:
scoped_handle.hpp(122) : warning C4561: '__fastcall' incompatible with the 
'/clr' option: converting to '__stdcall'

scoped_handle.hpp(130) : see reference to class template instantiation 
'stlsoft::function_translator_fastcall<H,R>' being compiled

scoped_handle.hpp(246) : warning C4561: '__fastcall' incompatible with the 
'/clr' option: converting to '__stdcall'

scoped_handle.hpp(397) : see reference to class template instantiation 
'stlsoft::scoped_handle<H>' being compiled

scoped_handle.hpp(259) : warning C4561: '__fastcall' incompatible with the 
'/clr' option: converting to '__stdcall'

scoped_handle.hpp(275) : error C2535: 
'stlsoft::scoped_handle<H>::scoped_handle(H,void (__stdcall *)(H),H)' : 
member function already defined or declared

smartptr/scoped_handle.hpp(246) : see declaration of 
'stlsoft::scoped_handle<H>::scoped_handle'

scoped_handle.hpp(288) : error C2535: 
'stlsoft::scoped_handle<H>::scoped_handle(H,R (__stdcall *)(H),H)' : member 
function already defined or declared

scoped_handle.hpp(259) : see declaration of 
'stlsoft::scoped_handle<H>::scoped_handle'
Mar 07 2007
parent "Matthew Wilson" <matthew hat.stlsoft.dot.org> writes:
I know exactly how to fix that. I will see to it forthwith.

If you want to do it yourself, just put a suitable #ifndef around line 500
(the one that contains "#define STLSOFT_CF_FASTCALL_SUPPORTED") in
$STLSOFT/include/stlsoft/internal/cccap/msvc.h. You probably won't have to
#ifndef line 504, but it's possible.

I'll do this properly and test it, and release (either as a little patch
here or, as is more likely, a beta 45 later today).

Cheers

Matthew

"Cláudio Albuquerque" <0318222801 netcabo.pt> wrote in message
news:esn5uj$dd3$1 digitalmars.com...
 Hi Mathew,

 I'm having some problems when doing a compilation with the CLR switch set.
 Although the cases in that this type of compilation are necessary are rare
I
 do need to support them.
 So do you have any ideas?

 Thanks
 Cláudio Albuquerque

 Compilation Ouput:
 scoped_handle.hpp(122) : warning C4561: '__fastcall' incompatible with the
 '/clr' option: converting to '__stdcall'

 scoped_handle.hpp(130) : see reference to class template instantiation
 'stlsoft::function_translator_fastcall<H,R>' being compiled

 scoped_handle.hpp(246) : warning C4561: '__fastcall' incompatible with the
 '/clr' option: converting to '__stdcall'

 scoped_handle.hpp(397) : see reference to class template instantiation
 'stlsoft::scoped_handle<H>' being compiled

 scoped_handle.hpp(259) : warning C4561: '__fastcall' incompatible with the
 '/clr' option: converting to '__stdcall'

 scoped_handle.hpp(275) : error C2535:
 'stlsoft::scoped_handle<H>::scoped_handle(H,void (__stdcall *)(H),H)' :
 member function already defined or declared

 smartptr/scoped_handle.hpp(246) : see declaration of
 'stlsoft::scoped_handle<H>::scoped_handle'

 scoped_handle.hpp(288) : error C2535:
 'stlsoft::scoped_handle<H>::scoped_handle(H,R (__stdcall *)(H),H)' :
member
 function already defined or declared

 scoped_handle.hpp(259) : see declaration of
 'stlsoft::scoped_handle<H>::scoped_handle'
Mar 07 2007