ukoethe / vigra

a generic C++ library for image analysis
http://ukoethe.github.io/vigra/
Other
407 stars 191 forks source link

Using Vigra with Visual Studio 2019 #478

Closed friedrichromstedt closed 5 days ago

friedrichromstedt commented 4 years ago

This is about using Vigra with Microsoft Visual Studio 2019 (v16.6.5).

I successfully built Vigra from commit cc5effe5 (current master branch from 2020-04-02). There were some errors during generating the Solution, but all of these were related to the test suite only.

I used a custom CMAKE_INSTALL_PREFIX; building the projects ALL_BUILD and INSTALL went along fine.

However, when trying to compile a noop C++ file attempting to include Vigra as installed, I am ending up with compilation errors.

A screen shot of the source code triggering the errors and a screen shot of the list of errors can be found attached. I am also attaching a screen shot of the location of one of the errors reported.

Before, I've tried to use the v1.11.1 release of Vigra, with similar errors (I've sent a corresponding email to vigra@mailhost.informatik.uni-hamburg.de already).

I'd appreciate any pointer on how to track this errors down. Please let me know how I can provide additional context information to help solving this problem.

Many thanks in advance, Friedrich

Compilation Errors

Source Code

Error Location

sstefan commented 4 years ago

I quickly checked that on my VS2019 and got the same errors.

The no-op test program compiles fine if I re-enable the forward declaration in multi_handle.hxx, line 48: https://github.com/ukoethe/vigra/blob/cc5effe52402c8591c868ee608a104caa9924ad9/include/vigra/multi_handle.hxx#L48-L56

Maybe this #ifndef exception can be restricted to the relevant (older?) versions of MSVC?

friedrichromstedt commented 4 years ago

I quickly checked that on my VS2019 and got the same errors.

Thanks for looking into this.

I successfully compiled the no-op test program by setting the Platform Toolset to Visual Studio 2015 (v140) (and setting the Target Platform to 10.0.18362.0). For the moment, I can work with this; in the current state of my project I am compiling a DLL using VS.

At some point however I expect that I'd possibly like to use Vigra in a Python extension module, so it would be best if Vigra would compile fine using the default Toolset at that moment. Nevertheless, I am not yet entirely sure about this.

I am glad that you possibly were able to spot the culprit already. Am I expected to do anything related to your proposition?

hmaarrfk commented 5 days ago

I think this has been resolved in 2024.