Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows (msvc++) support? #34

Closed
jgaa opened this issue Apr 26, 2015 · 10 comments
Closed

Windows (msvc++) support? #34

jgaa opened this issue Apr 26, 2015 · 10 comments

Comments

@jgaa
Copy link

jgaa commented Apr 26, 2015

Hi,

Do you have any plans to add Windows support using the Microsoft compiler?
The latest preview of Visual Studio 2015 looks very promising (it compiles all my C++14 code).

(I use Linux as my primary platform, but some projects has to be x-platform, and under Windows, I tend to use the Microsoft compiler).

@rbock
Copy link
Owner

rbock commented Apr 26, 2015

Hi,

I'd like to support MSVC and I'd like MSVC to support sqlpp11 :-) In other words: I'd certainly make small adjustments where necessary and justified, but I am not going to bend over backwards and use tons of #ifdef statements, for instance.

Admittedly, I haven't looked into it since September 2014. At that time, I could not even use sqlpp::wrong_t. And some default constructors were missing...

I am willing to give it another try, of course. Do you know if there is an online version of CTP 6, that I could use for experiments?

Best,

Roland

@jgaa
Copy link
Author

jgaa commented Apr 26, 2015

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 04/26/2015 11:06 AM, Roland Bock wrote:

Hi,

I'd like to support MSVC and I'd like MSVC to support sqlpp11 :-)
In other words: I'd certainly make small adjustments where
necessary and justified, but I am not going to bend over backwards
and use tons of #ifdef statements, for instance.

Admittedly, I haven't looked into it since September 2014. At that
time, I could not even use sqlpp::wrong_t. And some default
constructors were missing...

I am willing to give it another try, of course. Do you know if
there is an online version of CTP 6, that I could use for
experiments?

I am not aware of any online versions. I have installed CTP 6 in a VM
running a preview of Windows 10.

Jarle

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJVPNkLAAoJECdIPpCNC8tyxgMP/2SLwaqOR8kqfLSgVavgh+ov
InOO+jb7Q6Qs70xJMOwPnomoyZ4DIaSv9+CMYetPDTvlookv8uibdjAjfFxAl0Ol
akcyIH4cRQBZeB4p+ojUZx9RC45hvAECB3IFck7XS87f6wWawElLONK8Pe96aaxB
mGoJ1xAtJNJHHPrgkYLEM/kGwwMIKzPmBv6wfq8OkCQCAFw/4xhlJnmZFCJQgYhi
QrGG0pO7+l5BRIAw++fiIn8s77pPCvWyNh1Sm6N1hzlICorfaSrb0gMY6f1R0Z6C
JkguKa4Ha4N/XUwVKa+ZOs3NBCw8yDzWlvYJFx55j49zXM+gPppvImxFNwyda4aj
e3ALhONaZWDSThtsrx6cj2rOuuQHAL5y8hJSrvvwaVslvIWNdel31v26u5xNjUUy
EmkJca6+iJbPFORI8cp6G5448xXDUjEOJWfyPwj8QB/7WiOGRt/Zcj42TkYg7e9d
guBuagcHZeggTAh5sPfQKil6DlFfNlJTdoX9n6RvXQ6IuAMhsKm19SSn11a1Xihm
AkUOEQLR7eA954Q6n8db+QgoVAOjC4QdOGtUJa+LPcxGrd+JmDU3Yr0OAgFb4Vhs
mivGwIM2KfFIxZsm8UR5aIkfNib/dce7ywTOfrwiYm0SFWOy8htc03sXvSm+vEX1
NNhnl2atLtNe80Uq12Kn
=MT1s
-----END PGP SIGNATURE-----

@rbock
Copy link
Owner

rbock commented Apr 26, 2015

Have you tried to compile it? What is the first compiler error message you get?

Roland

PS: I'll try to set up a VM myself but it will take some time. I have a lot on my table these days...

@jgaa
Copy link
Author

jgaa commented Apr 26, 2015

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 04/26/2015 04:38 PM, Roland Bock wrote:

Have you tried to compile it? What is the first compiler error
message you get?

I have not tried to compile it yet. I was just looking around for a
database library for a project I'll work on this spring.

I'll give it a try under Windows next week.

Jarle

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJVPQ21AAoJECdIPpCNC8tyKPYP/0HbCzT1zNBDs6H9h3+ZhinY
TzqTA9+5NslYkCE9LthCDxOWR+umQUYNILBXwFRMhJAgdCR6hwXGiMJkB0sFFbdr
qcrnJT1laDQDMxSHu0+gVRixiPJGNU2G4RcdxQ9yWgIdwD33kvKkzURBFQoL1v9g
TnPQAEgoTIaWW4hFdihDlysa5nhEciNGHXis8cR7X88RlbUKJykwndNob5KoAh4G
PJ2ZNkRx5teiu50JDSLDHoInZv2Y+tWZcbT8oa53wM/TWrBk15HTBunT9p3uVkSv
hM6SHnYCwACDLG8GAGqEIyeRj0ld72uNDLFfH9oof3SLD/oNCZ1PEIlgrKHY4uMo
qCJLj6wjbkfmGpLFt7tGi6QZiqYZXAhhUhH9W2O4UbQKC59rDjFGMnZYA/KqX3ji
vtuoSqspkJn6TIxrePNd6WvQa825p9nZ5j9WPA6KNPLgvkPfhVho6YWNdkl5DQDW
vSOFf49npUxAT4PRlnNadtGs2RYY7ieH/aMQZfqi3K441Yq9291PYFqJSXa6ScHW
e7BPjdm83Djp+jAFyeZoOT5Vc5B6hfydF/Ra8LJgp2xrRfXkFENjt4u4/ZvLVNb7
uztCLPOuKErhwQESx3b2WInreUJFzU2euJ8M/ospUsRwmVcrnXOQ9CxNZdft6SC0
IJvSWjSOdYSmbd51ceRs
=NhBy
-----END PGP SIGNATURE-----

@rbock
Copy link
Owner

rbock commented Apr 27, 2015

Looking forward to seeing the results!

@jgaa
Copy link
Author

jgaa commented Apr 30, 2015

I gave it a try today. It seems like msvc still have some problems with modern code. There was lot's of errors - but the majority seemed to originate in the constexpr here:

Severity Description Project File Line
Error error C2864: 'sqlpp::alias::a_t::_alias_t::_literal': a static data member with an in-class initializer must have non-volatile const integral type BooleanExpressionTest alias_provider.h 67
Error error C2070: 'const char []': illegal sizeof operand BooleanExpressionTest alias_provider.h 67
Error error C2970: 'sqlpp::make_char_sequence': template parameter 'Input': '_literal': an expression involving objects with internal linkage cannot be used as a non-type argument BooleanExpressionTest alias_provider.h 67
Error error C2440: 'specialization': cannot convert from 'int' to 'const char (&)[0]' BooleanExpressionTest alias_provider.h 67
Error error C2864: 'sqlpp::alias::b_t::_alias_t::_literal': a static data member with an in-class initializer must have non-volatile const integral type BooleanExpressionTest alias_provider.h 68
Error error C2070: 'const char []': illegal sizeof operand BooleanExpressionTest alias_provider.h 68
Error error C2970: 'sqlpp::make_char_sequence': template parameter 'Input': '_literal': an expression involving objects with internal linkage cannot be used as a non-type argument BooleanExpressionTest alias_provider.h 68
Error error C2440: 'specialization': cannot convert from 'int' to 'const char (&)[0]' BooleanExpressionTest alias_provider.h 68

May be it's best to give Microsoft some more time (a year or five) to catch up with the standard... They have always lagged far behind, and put damaging constraints on lots and lots of projects that relies on their compilers. (I suffer from that nearly every time I touch commercial code).

@rbock
Copy link
Owner

rbock commented Apr 30, 2015

Thanks for the report!

As of now, I do not see a good way to replace that constexpr with something else that give the same level of name safety while keeping the code lean...

The annoying thing is that the same line outside a struct works fine (tested here: http://webcompiler.cloudapp.net/)

I'll file a bug with MS and close this ticket for now.

Best,

Roland

@fire
Copy link

fire commented May 17, 2015

Were you able to try VS 2015 RC?

@jgaa
Copy link
Author

jgaa commented May 17, 2015

I tried VS 2015 RC yesterday. Still no luck. I hoped that the newly announced clang front-end may be able to work around the limitations in msvc++, but I could not find a way to enable it for native code. I asked if that can be done is a msdn forum - but no replies yet.

@rbock
Copy link
Owner

rbock commented May 18, 2015

Thanks for the update! Also nothing on the bug I filed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants