Reply to topic

Qt5.6 + MSVS 2015

vitperov
Registered Member
Posts
1
Karma
0

Qt5.6 + MSVS 2015

Tue Jul 12, 2016 9:33 am
Hi, I use marblewidget (Marble 16.04) in my project. And with Qt5.5 + MSVS 2012 it works perfectly!
I've decided to upgrade to Qt5.6 + MSVS 2015, and my map started jittering.

I use:
Code: Select all
MarbleWiget::CenterOn(const qreal lon, const qreal lat, bool animated )

and update the coordinates with small deltas (~ 1e-7).

Furher investigations:
1) Bug is only in Release version
2) Surprise, but bug only appears when start my application with DirectX. With OpenGL it works perfectly!
3) I've traced the coordinates. They are spoiled in:
Code: Select all
 qreal  latitude( GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian )

Just before return it prints as double value(return d->m_lon * RAD2DEG).
Just after assignment it prints as truncated to float.

It looks as bug in compiller optimization.
The question is: How can I disable optimization for the release Marble build?

I tried add the following code into CMakeLists.txt (at source root):
Code: Select all
STRING(REPLACE "-O2" "-Od" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
STRING(REPLACE "/O2" "/Od" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})


but it doesn't helped me. Anyway there is /O2 optimization in CMakeCache.txt:
Code: Select all
CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /D NDEBUG

Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], funkyskywalker, Google [Bot], irvingarrietavazquez, jeffgila, jmacleod, koffeinfriedhof, richmaxw, Sogou [Bot], Stephen Leibowitz, Yahoo [Bot]