MSVC2013 c++11 support

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

MSVC2013 c++11 support

Postby abdullah » Fri Apr 05, 2019 7:42 am

Hi there!

I have been trying to make some code pass the appveyor CI for a while.

At the end I posted on stackoverflow:
https://stackoverflow.com/questions/554 ... h-msvc2013

Basically the answer to my question is that MSVC2013 does not have full c++11 support.

In one other reply, one user asked me why weren't we using gcc or clang in windows. I could not answer the question, and that is the reason of this post.

Why aren't we using gcc or clang in Windows? If we can't or is not appropriate, is there any other newer "free" version of MSVC to which we could move?
User avatar
saso
Posts: 1333
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: MSVC2013 c++11 support

Postby saso » Fri Apr 05, 2019 8:29 am

The idea of CI is to run and test the builds on as many different systems as possible, since we are already building with gcc and clang on linux (Travis) it makes more sense to build with MSVC on Windows... Moving to a newer MSVC version should be possible https://www.appveyor.com/docs/windows-images-software/

PS: additionally to updating Appveyor to a never MSVC version there is also the need to update Travis linux builds to a never version of Ubuntu (Xenial). Another thing to research is the possibility to move Windows builds from Appveyor to Travis https://blog.travis-ci.com/2018-10-11-w ... ly-release
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: MSVC2013 c++11 support

Postby abdullah » Fri Apr 05, 2019 3:03 pm

yorik wrote:...ping...
wmayer wrote:...ping...
saso wrote:
Fri Apr 05, 2019 8:29 am
The idea of CI is to run and test the builds on as many different systems as possible
saso wrote:
Fri Apr 05, 2019 8:29 am
Moving to a newer MSVC version should be possible
Ah! I thought there was an important reason for maintaining support for MSVC2013, like providing images for old windows versions (XP?), or that there was no other version available for free...

I am trying to learn proper c++11, so I would be interested in having full support. Is there any other reason not to?
User avatar
sgrogan
Posts: 5424
Joined: Wed Oct 22, 2014 5:02 pm

Re: MSVC2013 c++11 support

Postby sgrogan » Fri Apr 05, 2019 3:41 pm

abdullah wrote:
Fri Apr 05, 2019 3:03 pm
Ah! I thought there was an important reason for maintaining support for MSVC2013, like providing images for old windows versions (XP?), or that there was no other version available for free...
The reason is we need a LibPack of all the dependencies that is compatible with new complilers. This is possible since yesterday. Thanks apeltauer!
https://forum.freecadweb.org/viewtopic. ... 62#p299048
The new LibPack will work with VS2015, VS2017, and VS2019.
It seems to take a little longer to compile FreeCAD, so it is definitely worth it to try to get Windows working on Travis.
wmayer
Site Admin
Posts: 14892
Joined: Thu Feb 19, 2009 10:32 am

Re: MSVC2013 c++11 support

Postby wmayer » Fri Apr 05, 2019 4:04 pm

I am trying to learn proper c++11, so I would be interested in having full support. Is there any other reason not to?
It's OK to move to the next MSVC version then.

The most important requirement for me is that the code must compile on all supported (mainly Linux distributions) platforms with the standard compiler.
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: MSVC2013 c++11 support

Postby abdullah » Fri Apr 05, 2019 5:05 pm

wmayer wrote:
Fri Apr 05, 2019 4:04 pm
It's OK to move to the next MSVC version then.

The most important requirement for me is that the code must compile on all supported (mainly Linux distributions) platforms with the standard compiler.
sgrogan wrote:
Fri Apr 05, 2019 3:41 pm
It seems to take a little longer to compile FreeCAD, so it is definitely worth it to try to get Windows working on Travis.
Great!

I am not familiar with AppVeyor or Travis. So I do not know what to do. Who can help me out here? :)
User avatar
saso
Posts: 1333
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: MSVC2013 c++11 support

Postby saso » Fri Apr 05, 2019 5:26 pm

abdullah wrote:
Fri Apr 05, 2019 5:05 pm
I am not familiar with AppVeyor or Travis. So I do not know what to do. Who can help me out here? :)
If you need it for yourself, you can find the direct download for Visual Studio Community 2015 here
https://stackoverflow.com/questions/442 ... 5-not-2017

For Appveyor I am trying to get it to work here
https://github.com/sasobadovinac/FreeCA ... pveyor.yml
https://ci.appveyor.com/project/sasobad ... ad/history
current status cmake does not see the libs fixed
now missing boost libraries :roll:
Last edited by saso on Fri Apr 05, 2019 5:58 pm, edited 1 time in total.
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: MSVC2013 c++11 support

Postby abdullah » Fri Apr 05, 2019 5:42 pm

saso wrote:
Fri Apr 05, 2019 5:26 pm
abdullah wrote:
Fri Apr 05, 2019 5:05 pm
I am not familiar with AppVeyor or Travis. So I do not know what to do. Who can help me out here? :)
If you need it for yourself, you can find the direct download for Visual Studio Community 2015 here
https://stackoverflow.com/questions/442 ... 5-not-2017

For Appveyor I am trying to get it to work here
https://github.com/sasobadovinac/FreeCA ... pveyor.yml
https://ci.appveyor.com/project/sasobad ... ad/history
current status cmake does not see the libs fixed
now missing boost libraries :roll:
I needed for CI (I do not have Windows). Thanks for trying to set it up! :)
User avatar
sgrogan
Posts: 5424
Joined: Wed Oct 22, 2014 5:02 pm

Re: MSVC2013 c++11 support

Postby sgrogan » Fri Apr 05, 2019 5:51 pm

saso wrote:
Fri Apr 05, 2019 5:26 pm
now missing boost libraries
I had the same problem locally, it went away when I updated CMake (to 3.14)
You may also need to set the USE_QT5 flag.

EDIT:You also need to use the new libpack from apeltauer
User avatar
saso
Posts: 1333
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: MSVC2013 c++11 support

Postby saso » Fri Apr 05, 2019 8:13 pm

sgrogan wrote:
Fri Apr 05, 2019 5:51 pm
I had the same problem locally, it went away when I updated CMake (to 3.14)
Does not help
https://ci.appveyor.com/project/sasobad ... s/23635994

If I set BOOST_ROOT=C:\Libraries\boost_1_67_0 it runs a bit further but then breaks again at src/Mod/Path/libarea/CMakeLists.txt:26
https://ci.appveyor.com/project/sasobad ... s/23636105 (boost_python)

Maybe CMakeLists needs to be updated somehow for the new libpack?

sgrogan wrote:
Fri Apr 05, 2019 5:51 pm
You may also need to set the USE_QT5 flag.
Thanks, it was BUILD_QT5 ;)
Last edited by saso on Fri Apr 05, 2019 10:00 pm, edited 1 time in total.