Compilation fails when compiling with VC++ 2010 Express

Bug #1495365 reported by Jan Dubiec
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Fix Released
Undecided
Unassigned

Bug Description

Compilation of the latest default branch (0ef305) fails when compiling with Visual C++ 2010 Express. One error is related to log1p() which isn't available under VC++ 2010 and the second is caused by "ambiguous call to overloaded function" sqrt(). Appropriate patch is in the attachment.

Best regards,
Jan

Revision history for this message
Jan Dubiec (jdx) wrote :
Jan Dubiec (jdx)
description: updated
Revision history for this message
tmodes (tmodes) wrote :

Thanks for the patch. I committed a slightly modified version. I did not know that someone else is compiling Hugin on Windows and is using such an older compiler ;-)
When you have a working own compiled Hugin version, consider stepping in the official building of Hugin for Windows. We need builder for Windows.

Changed in hugin:
status: New → Fix Committed
Revision history for this message
Jan Dubiec (jdx) wrote :

A few comments about your version of my patch:
1. It seems that log(1+x) has issues for small x: http://www.boost.org/doc/libs/1_59_0/libs/math/doc/html/math_toolkit/powers/log1p.html what, I believe, is the reason why log1p() has been introduced into C and C++ standards. So why not use Boost's log1p() if Boost is used anyway?
2. std::sqrt() for integral arguments is C++11 feature (http://en.cppreference.com/w/cpp/numeric/math/sqrt) so it is not supported by VC++ 2010.

Yeah, I use an ancient compiler because I haven't been able to build Hugin with MinGW-W64's gcc-5.1.0 - I've got some linker, Unicode & windows.h related issues. So I (quite easily) managed to build Hugin.2015.0 and default branch using VC++ 2010. But my goal is to build Hugin on Windows using latest versions of gcc . And, by the way, clean-up some mess in the code (eg. IMO macros _WIN32, WIN32 and _WINDOWS are used inconsistently).

BTW. Where is the right place to ask some questions related to build environment?

Revision history for this message
tmodes (tmodes) wrote :

1.) log1p was introduced recently. So all old versions were using log(1+x). And on the long term I want to get rid of the boost dependency.
2.) Sorry, I have missed the static_cast.

tmodes (tmodes)
Changed in hugin:
milestone: none → 2016.0beta1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.