Closed skn123 closed 4 years ago
There is a suspect error "cannot open source file ... CUBICALCOMPLEX.H" to be checked first. Otherwise I suspect that the compiler does not accept to befriend a template specialisation. I am trying a workaround on my branch Fix1478. Could you test it ? (I do not have Visual Studio). https://github.com/JacquesOlivierLachaud/DGtal/tree/Fix1478
Nothing wrong with the code. The error in VS indicates that those functions have not been defined. I disabled access to those functions with a simple #ifdef statement. Now the program works. What needs to be done is to define those functions somewhere.
They are defined in CubicalComplexFunctions.h
And they are (forward) declared just few lines above so it should not worried about the definition at this step (and the error is not about a definition lack). I will take a look on my Windows!
Cool Roland ! Can you check the workaround I did in my branch mentioned above ?
I can reproduce the issue on Visual Studio 2019 and yes @JacquesOlivierLachaud , your fix works 👍
Do you think it is an acceptable workaround ? I am opening to friendship all kinds of CubicalComplex operations, whatever the parameterised types, instead of restricting friendship to the ones with the same parameterised types. I think it is ok here, but I would feel better if you think the same. 😄
In this social distancing time, it is not recommanded to shake hands with the first template parameter you meet but it should not break anything. I will do some more tests on Visual Studio (I am probably not used to but it is a real pain to configure) to understand why compilation fails with this two operators and not others ...
Just to tell you that I encountered the same issue in VS 2019 and the fix worked for me as well. Thank you!
Thanks for checking also !
What could be the reason? Of course, no problems when building in Ubuntu