ApproxMVBB icon indicating copy to clipboard operation
ApproxMVBB copied to clipboard

VS2017 - definition of dllimport function not allowed errors

Open adam-hartshorne opened this issue 6 years ago • 4 comments

When building the library and various projects, I receive a number of #C2491 errors e.g. error C2491: 'ApproxMVBB::approximateMVBBGridSearch': definition of dllimport function not allowed

I believe it is this problem which is specific to Visual Studio compiler,

https://msdn.microsoft.com/en-us/library/62688esh.aspx

https://docs.microsoft.com/en-us/cpp/cpp/using-dllimport-and-dllexport-in-cpp-classes

adam-hartshorne avatar Feb 25 '18 01:02 adam-hartshorne

could you send me the output log :) thanks. then i can fix it

gabyx avatar Feb 25 '18 11:02 gabyx

or even better send me a PR :) eith the fix. because I have no windows here :)

gabyx avatar Feb 25 '18 11:02 gabyx

Find attached the output log. I am away this week, so I am not going to have a chance to properly look at a potential fix myself for the next few days.

AproxMVBB_vs2017_build_log.txt

adam-hartshorne avatar Feb 25 '18 16:02 adam-hartshorne

Could you test on the current master branch with VS 17 if the problem persists?

gabyx avatar Sep 19 '18 09:09 gabyx