-
Notifications
You must be signed in to change notification settings - Fork 61
WinRT require /ZW #62
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
Conversation
|
It looks like the pull request adds /ZW to all VC++ compiles. not just WinRT builds. That does not seem to be correct. |
|
fixed |
|
I had only cursory look, but the title of this pull request and its explanation refers to asio. However, the change itself of for generic Boost.Build code. May I suggest that either this change be made in asio jamfiles, or a comment be added as to why /ZW is reasonable for all uses of Boost.Build? |
ya if u tell me where the file is
store apps are supposed to be built with /ZW. it's common knowledge. random require /ZW since boostorg/random@1e901ec |
|
It might be common, but we have so much common knowledge it that file On Tue, Apr 14, 2015 at 4:32 PM John Sebastian Peterson <
|
|
there's no clear statement from microsoft. some indirect statements https://www.google.com/search?q=store+apps+compilation+%2Fzw #62 (comment). @chriskohlhoff might know because he wrote a lot of winrt code boostorg/asio@e746865 |
|
I think this should go through as it will only affect end-users building Windows non-desktop apps as far as the msvc.jam is concerned. That is really little overhead to pay for Boost build users. Is there a reason why we can not move forward with this ? The link https://msdn.microsoft.com/en-us/library/hh561383.aspx clearly specifies that for Windows Store apps the /ZW switch must always be specified. My understanding of Windows phone apps is that they also use the C++/CX so that adding /ZW for them is also correct. According to the link above the /EHsc compiler switch should always be added when /ZW is added. |
|
i added /EHsc |
|
I have cherry-picked these two changes (squashing and editing the log message). Thanks! |
|
When I include these changes locally in my boost/build and then try to build boost.filesystem, I get these error messages in VS2015: Without these changes it compiles fine when invoking From this StackOverflow question and answer (disclaimer answer by me with the help from somebody else) http://stackoverflow.com/questions/32945500/compiling-c-cx-on-the-command-line it seems that |
|
This patch works fine with VS 2013 - where .bat scripts set library paths correctly. The whole issue with VS 2015 seems that .bat scripts look for components in wrong places and fail, and I don't think it's Boost.Build job to work that around. As for /ZW versus WRL, I don't have an opinion. What would be the benefit of using WRL? |
|
@vprus are you referring to this vs2015 bug you are mentioning here: http://lists.boost.org/Archives/boost/2015/09/225609.php ? you are right there is probably no benefit of using wrl over c++/cx |
there's no /ZW in https://github.com/boostorg/build/blob/develop/src/tools/msvc.jam so both link=shared and link=static are without the Windows namespace and without __cplusplus_winrt. this cause errors like this with both link=shared and link=static
without /ZW there's no Windows namespace or __cplusplus_winrt macro
/ZW is recommended but not necessary for WinRT
another solution is to rewrite boostorg/asio to not require /ZW. which would be pointless
the Windows namespace can be accessed with an #include instead of with /ZW
Qt is an example of a lib that doesn't use /ZW. but their reason (code standard and text editor support) is pointless