Cannot compile with VS 2010 and option /Za (MS specific extensions disabled) (Bug #3841)


Added by Frank Stähr over 10 years ago. Updated over 9 years ago.


Status:Open Start date:2014-08-05
Priority:Low Due date:
Assignee:Roman Donchenko % Done:

0%

Category:build/install
Target version:2.4.10
Affected version:2.4.9 (latest release) Operating System:Windows
Difficulty: HW Platform:x64
Pull request:

Description

Hello everybody!

With Visual Studio 2010 Ultimate and Windows7-64bit it is not possible to deactivate the Microsoft specific language extensions. See <http://msdn.microsoft.com/en-us/library/0k0w269d%28v=vs.100%29.aspx> for further information about that.

I tried to compile the attached project (target program is 32 bit), but got the error
D:\libs\opencv249\build\include\opencv2/core/operations.hpp(1458): error C2065: 'val': undeclared identifier
If you want to test this, you can edit the file VC10Test.vcxproj manually and just have to customize the place of your OpenCV installation. I didn’t compile OpenCV 2.4.9 by myself, just took the download from the website.

The workaround is obviously to activate language extensions, but I am loosing portability then.

See also <http://answers.opencv.org/question/10396/compilation-error-vs-2008-64-bit-windows-7/>: Other VS versions, OpenCV versions and 64 bit may probably be affected, too.

Of course, it could be a VS-2010 problem, perhaps someone could test 2012 or 2013.


VC10Test.tar (7 kB) Frank Stähr, 2014-08-05 11:20 am


Associated revisions

Revision d2da7dc3
Added by Vadim Pisarevsky almost 10 years ago

Merge pull request #3841 from MSOpenTech:samples-contrib

History

Updated by Dmitry Retinskiy over 10 years ago

Roman, could you check the problem?
Thanks.

  • Status changed from New to Open
  • Target version set to 2.4.10
  • Category set to build/install
  • Assignee set to Roman Donchenko

Updated by Vadim Pisarevsky over 10 years ago

We can not guarantee that OpenCV can be built or used with any possible combination of flags. If there is patch that solves the problem, please, submit the patch at github.com/itseez/opencv.

  • Priority changed from High to Low

Updated by Frank Stähr about 10 years ago

For the sake of completeness: Same problem with 2.4.10, same problem with Visual Studio 2013, same problem with 64 bit.

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4802

Also available in: Atom PDF