darrenlafreniere / lafarren-image-completer

Implementation of the research titled: "Image Completion Using Efficient Belief Propagation via Priority Scheduling and Dynamic Pruning"
http://www.lafarren.com/image-completer/
GNU General Public License v3.0
32 stars 18 forks source link

MaskInternal not forward declared correctly #7

Closed daviddoria closed 13 years ago

daviddoria commented 13 years ago

I get these kinds of things:

/media/portable/Projects/src/lafarren-image-completer/src/priority-bp/impl/Mask.cpp:138: error: invalid use of incomplete type ‘struct PriorityBp::MaskInternal’ /media/portable/Projects/src/lafarren-image-completer/src/priority-bp/impl/Mask.h:128: error: forward declaration of ‘struct PriorityBp::MaskInternal’ /media/portable/Projects/src/lafarren-image-completer/src/priority-bp/impl/Mask.cpp:166: error: invalid use of incomplete type ‘struct PriorityBp::MaskInternal’ /media/portable/Projects/src/lafarren-image-completer/src/priority-bp/impl/Mask.h:128: error: forward declaration of ‘struct PriorityBp::MaskInternal’

darrenlafreniere commented 13 years ago

Because MaskInternal is only used within Mask.cpp. It's referenced by Mask.h, but only as a pointer and a reference type. I changed how it was forward declared; see if this fixes your compiler errors:

https://github.com/darrenlafreniere/lafarren-image-completer/commit/e37714c0d622261a42118c087b393f956e720d74

daviddoria commented 13 years ago

Nope, I still get this:

/media/portable/Projects/src/lafarren-image-completer/src/priority-bp/impl/Mask.cpp:138: error: invalid use of incomplete type ‘struct PriorityBp::MaskInternal’ /media/portable/Projects/src/lafarren-image-completer/src/priority-bp/impl/Mask.h:107: error: forward declaration of ‘struct PriorityBp::MaskInternal’

darrenlafreniere commented 13 years ago

Hmm, I don't get it. MaskInternal is fully defined right above where the error is.

daviddoria commented 13 years ago

It was my mistake. I had nested namespace PriorityBp inside of namespace PriorityBp!