Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Looking for windows compiler possibilities
Looking for windows compiler possibilities [message #44806] Wed, 01 July 2015 14:13 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I am becoming uneasy about windows releases.

It would be great to

a) move to C++11
b) provide compiler toolchain as part of release

Current 'default' way is to install Win7 SDK. That is good, but not C++11...

Later Microsoft compilers need to be installed with Visual Studio and (AFAIK, please correct me) with separate SDK. And, of course, we cannot ship them with U++. Maybe it would be possible to do some sort of automated web install?

clang-cl (Microsoft compatible) seems to almost work, but is not quite mature now.

Then there is mingw-w64. This is quite close to what we need, but mingw still is slower than msc/clang and resulting binaries are quite larger than with MSC. Another issue is that most 3rd party libraries (like DB clients or openssl) are coming with MSC compatible headers/libraries. Might be fixed by providing all imaginable libraries in the release (nowadays, I would not care if U++ installer has 300MB).

It also seems possible to use clang with mingw. It however seems that clang-mingw has problems with exception in 64bit mode.

Any thoughts or suggestions?
Re: Looking for windows compiler possibilities [message #44807 is a reply to message #44806] Wed, 01 July 2015 14:33 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
I've been investigating this myself the past few weeks and found that:

1. clang++ seems to be just a compiler. Not sure if 100% mature, but probably good enough as a compiler. It still needs an SDK. I managed to compile C++ with it, but I had to use the MS SDK and point clang to the headers and libs. I do not know about clang-cl, maybe that one is a full SDK?
2. I'm still wrestling with mingw-w64 and getting it to install. I managed to get it though cygwin, but that seems a bit of an overkill for me.
Re: Looking for windows compiler possibilities [message #44808 is a reply to message #44807] Wed, 01 July 2015 16:17 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
By clang-cl I mean Microsoft SDK compatible clang - the one you have used.

There is another win variant, which is mingw-w64 compatible.
Re: Looking for windows compiler possibilities [message #44809 is a reply to message #44808] Thu, 02 July 2015 09:11 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
I use MSC12-64 bits as main compiler and TDM-GCC-64 as a second option to check code compatibility with GCC and to have a "second opinion" when I get cryptic error messages from MSC.

It would be great if U++ installer could include a GCC compiler. TDM compiles all U++ sources without problems. Options:
- TDM bundled with U++: Installer could be too big. In the past I prepared a zip with all the basics of MinGW. However, as GCC goes changing this could not be efficient.
- U++ installer asks the user to install TDM and if yes, downloads and calls the installer.
- U++ installer downloads TDM files in U++ compiler folder. Possibly the best option.


Best regards
Iñaki
Re: Looking for windows compiler possibilities [message #44824 is a reply to message #44806] Sun, 05 July 2015 07:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Interesting overview here:

https://wiki.qt.io/MinGW-64-bit

Now I have rechecked Mingw-w64. It works fine, more or less, the problem is speed - while it takes 30s for MSC to recompile debug theide, for mingw it is twice as much (~65s). Worse, significant part is spent in linker (~15s), which has to be done even on recompiling the single file... Sad

It is really mess. The only chance is clang...

Mirek
Re: Looking for windows compiler possibilities [message #44825 is a reply to message #44824] Sun, 05 July 2015 12:55 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Mirek,

In my opinion speed is not big problem. The real problem on Windows platform is that we don't supply any compile. For new users it is big think to have compile out of the box. Even if they didn't link Windows SDK. They can try Core or even start coding in pure c++ with standard library. If they begin to like TheIDE they start looking around more advanced topics. So, entry barrier shouldn't be that big.

You can try clang, but even if it does not meet your expectations. You should consider bundle any compiler. More advanced users will always be able to link MSC...

Sincerely,
Klugier


U++ - one framework to rule them all.
Re: Looking for windows compiler possibilities [message #44826 is a reply to message #44825] Sun, 05 July 2015 16:36 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Clang, but don't we need an SDK?
Re: Looking for windows compiler possibilities [message #44827 is a reply to message #44826] Sun, 05 July 2015 20:43 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
cbpporter wrote on Sun, 05 July 2015 16:36
Clang, but don't we need an SDK?


mingw-w64 should be usable as SDK for clang.

It is sort of complicated and I am still missing details. That is why I have started this thread.

Anyway, it seems like clang can be compiled to be compatible with MSC SDK, or can be compiled to be compatible with mingw.

Now to make things even more fun, there are about 10 flavors of mingw. You can have 64/32 bit. You can have SjLj/Dwarf2/SEH exceptions (but to make it more fun, dwarf only with 32 bit and SEH only with 64 bit... Smile. Then you can have Win32 threads (and lack C++11 threading facilities), or POSIX threads, which are slow... Smile

And you have to match the clang with all this mess somehow.. Smile

Now I will probably concentrate on this in coming weeks. But in the same time, it would be great if somebody else tried too...

Mirek
Re: Looking for windows compiler possibilities [message #44828 is a reply to message #44827] Mon, 06 July 2015 08:51 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
For the sake of simplicity I would use the simplest to install and most robust compiler in U++ Windows installer.

I think that first time user needs simplicity and to see that all examples compile and work just out of the box, although it would require more time to compile than other options. In the same installer or in the download page I would put two options:
- The first one: install and run (preferred)
- The second one, for advanced users, would go to the place where compiler directories are searched and selected.


Best regards
Iñaki
Re: Looking for windows compiler possibilities [message #44830 is a reply to message #44828] Mon, 06 July 2015 10:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Mon, 06 July 2015 08:51
For the sake of simplicity I would use the simplest to install and most robust compiler in U++ Windows installer.

I think that first time user needs simplicity and to see that all examples compile and work just out of the box, although it would require more time to compile than other options. In the same installer or in the download page I would put two options:
- The first one: install and run (preferred)
- The second one, for advanced users, would go to the place where compiler directories are searched and selected.


That would probably solve first part of problem (newbie), but not exactly second one (we would like C++11).

With clang, there is a chance to solve both issues IMO.

Mirek
Re: Looking for windows compiler possibilities [message #44831 is a reply to message #44830] Mon, 06 July 2015 10:57 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
I'll try to help.

Currently, all I managed to do is compile same basic code with clang and MSC SDK. Was reasonably fast, probably a bit slower than MSC.

Could you provide the exact link to MINGW-w64 that you are using so I can install that and use it as an SDK?

And does it support 32bit?

Edit: typo.

[Updated on: Mon, 06 July 2015 11:00]

Report message to a moderator

Re: Looking for windows compiler possibilities [message #44833 is a reply to message #44831] Mon, 06 July 2015 11:35 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
cbpporter wrote on Mon, 06 July 2015 10:57
I'll try to help.

Currently, all I managed to do is compile same basic code with clang and MSC SDK. Was reasonably fast, probably a bit slower than MSC.

Could you provide the exact link to MINGW-w64 that you are using so I can install that and use it as an SDK?

And does it support 32bit?



I wish I knew...

From what I have gathered so far, I was unable to find recent version of clang prebuilt. There is only a couple of tutorials to build it....

AFAIK clang is 'mated' with mingw distribution during build process. Not all mingws are supported though...

Mirek
Re: Looking for windows compiler possibilities [message #44834 is a reply to message #44833] Mon, 06 July 2015 11:41 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
The one that worked for me for that single test was from: http://llvm.org/releases/download.html

As for the mingw-w64 I got, it was from cygwin which is far from ideal.

BTW, how about updating the installer to check for prerequisites? And add support for downloading and running the SDK installer or any of the VS Express editions (in addition to detecting the installed ones).

It is a lot of work, I know, but if mingw won't work out...
Re: Looking for windows compiler possibilities [message #44835 is a reply to message #44834] Mon, 06 July 2015 13:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, but AFAIK that one particular clang is not compatible with mingw SDK...

Anyway, the idea about prerequisites is now bad - I just did not knew it is possible in Windows... Smile (is it possible, right?)
Re: Looking for windows compiler possibilities [message #44836 is a reply to message #44834] Mon, 06 July 2015 13:10 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
cbpporter wrote on Mon, 06 July 2015 11:41
The one that worked for me for that single test was from: http://llvm.org/releases/download.html


BTW, funny trouble about this clang is that U++ considers it C++11 compatible (rightfully), but C++11 library is missing, so U++ sources cannot be compiled without tweaks...

Mirek
Re: Looking for windows compiler possibilities [message #44837 is a reply to message #44836] Mon, 06 July 2015 13:18 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
I compiled legitimate C++ code but did not use C++ headers, so I can confirm that C++ works fine (I did have to tweak my code since clang is far more restrictive than MSC) and the windows .lib from MS SDK are compatible with clang.
Re: Looking for windows compiler possibilities [message #44838 is a reply to message #44837] Mon, 06 July 2015 13:26 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
MINGW version are so confusing.

http://sourceforge.net/projects/mingw-w64/

Is this the fork that is semi-reverse engineered of the old abandoned MINGW? The one we are supposed to be using? Anyway, it fails to install for me. The installer might not support proxy.
Re: Looking for windows compiler possibilities [message #44839 is a reply to message #44835] Tue, 07 July 2015 10:16 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
mirek wrote on Mon, 06 July 2015 14:09
Well, but AFAIK that one particular clang is not compatible with mingw SDK...

Anyway, the idea about prerequisites is now bad - I just did not knew it is possible in Windows... Smile (is it possible, right?)


Sure, it is possible. Like I said, it won't be easy.

How about if we try it in steps. How about if the build methods detector detects clang? Then we add a check box with "override compiler" to the right of the build methods dropdown? So we can build a package with MSC10 or MSC10 with Clang.

And how about we leave that check box on on as default for a couple of weeks and see if Clang with MS SDK is up to par? Production ready?
Re: Looking for windows compiler possibilities [message #44842 is a reply to message #44839] Tue, 07 July 2015 19:01 Go to previous messageGo to next message
Sgifan is currently offline  Sgifan
Messages: 37
Registered: February 2010
Location: France
Member
Why not propose (and adapt The IDE to) using VS2013 community edition

It would be perfect in most situation (legalize wise) and it is C++11.

I know that currently the IDE does not work with it, at least that's what I did experience






Re: Looking for windows compiler possibilities [message #44848 is a reply to message #44842] Wed, 08 July 2015 09:24 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Sgifan wrote on Tue, 07 July 2015 19:01
Why not propose (and adapt The IDE to) using VS2013 community edition

It would be perfect in most situation (legalize wise) and it is C++11.


Not "enough" C++11 unfortunately AFAIK. Things required for pick/clone to work are not there. Anyway, perhaps it is worth workaround.

Quote:

I know that currently the IDE does not work with it, at least that's what I did experience


Autodetect might not work, but I believe that after fixing paths, it should work just fine.

Generally, I agree that we should support this out of box. But it would still be nice to have "complete download".

Mirek
Previous Topic: Google code shutting down
Next Topic: Interesting Idea: Stop writing Regular Expressions. Express them with Verbal Expressions.
Goto Forum:
  


Current Time: Thu Mar 28 15:07:24 CET 2024

Total time taken to generate the page: 0.01498 seconds