enblend solution build fails

42 views
Skip to first unread message

hbl

unread,
Jul 27, 2008, 5:18:10 PM7/27/08
to hugin and other free panoramic software
Building the latest enblend_msvc2008, fails in enfuse at the following
line:

class NotifyingDirectionSelector<UnstridedArrayTag, T, Notify>
{
friend class Notify::self_type; //error C2242


Is anyone else getting this error?

hbl

unread,
Jul 30, 2008, 9:20:55 PM7/30/08
to hugin and other free panoramic software
bump

Guido Kohlmeyer

unread,
Jul 31, 2008, 5:35:13 PM7/31/08
to hugi...@googlegroups.com
I can confirm this error on Win32, MSVC 9.0.
It seems to be a problem of friendship specification between classes.
The MSVC compiler needs to know the class. Unfortunately I'm not
familiar with the code or the template class specifications.
Maybe Andrew Mihal can clearify the case, because he introduced the
changes in the latest CVS revision, which yields to the failed build on
MSVC.

Guido

hbl schrieb:

hbl

unread,
Jul 31, 2008, 8:44:14 PM7/31/08
to hugin and other free panoramic software
Thanks for the reply, Guido. I am trying to sort through it but it is
tough going not being familiar with the code. I put in a support
request on the project tracker. Hopefully Andrew will step in with a
solution.
> >> Is anyone else getting this error?- Hide quoted text -
>
> - Show quoted text -

Fahim Mannan

unread,
Aug 1, 2008, 7:26:25 PM8/1/08
to hugi...@googlegroups.com
Hi,

Using 'typename' instead of 'class' should fix the problem. Ie.

friend typename Notify::self_type;


-Fahim

Guido Kohlmeyer

unread,
Aug 2, 2008, 7:33:57 PM8/2/08
to hugi...@googlegroups.com
Dear Fahim,

Thank you for this hint. After small modification as suggested the build
processed finished successfully.

Guido

Fahim Mannan schrieb:

Yuval Levy

unread,
Aug 2, 2008, 7:40:56 PM8/2/08
to hugi...@googlegroups.com
Confirm here on MSVC 8 EE - works like a charm. Patch attached. Thanks
Fahim!
cachedfileimage.hxx.patch

hbl

unread,
Aug 4, 2008, 2:15:40 PM8/4/08
to hugin and other free panoramic software
Confirm successful build using Visual C++ 2008 Express Edition.
> [cachedfileimage.hxx.patch]Index: cachedfileimage.hxx
> ===================================================================
> RCS file: /cvsroot/enblend/enblend/include/vigra/cachedfileimage.hxx,v
> retrieving revision 1.24
> diff -u -r1.24 cachedfileimage.hxx
> --- cachedfileimage.hxx 21 Jul 2008 04:48:26 -0000      1.24
> +++ cachedfileimage.hxx 2 Aug 2008 23:27:32 -0000
> @@ -552,7 +552,7 @@
>  template <class T, class Notify>
>  class NotifyingDirectionSelector<UnstridedArrayTag, T, Notify>
>  {
> -friend class Notify::self_type;
> +friend typename Notify::self_type;
>  protected:
>      NotifyingDirectionSelector(T base = 0) : current_(base), notify_(NULL) {}
>      NotifyingDirectionSelector(NotifyingDirectionSelector const & rhs) : current_(rhs.current_), notify_(NULL) {}
> @@ -594,7 +594,7 @@
>
>  template <class T, class Notify>
>  class NotifyingDirectionSelector<StridedArrayTag, T, Notify> {
> -friend class Notify::self_type;
> +friend typename Notify::self_type;
>  protected:
>      NotifyingDirectionSelector(int stride = 1, T base = 0) : stride_(stride), current_(base), notify_(NULL) {}
>      NotifyingDirectionSelector(NotifyingDirectionSelector const & rhs) : stride_(rhs.stride_), current_(rhs.current_), notify_(NULL) {}- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages