Comments (15)
Status update: I've finally managed to get Fruit to compile and pass all tests with the MSVC compiler (by working around several compiler bugs), inspired by @fran6co's PR.
I still need to polish up my changes and make sure they don't break Linux/OS X builds, but I should be able to commit them to master next Saturday/Sunday.
from fruit.
Hi, I now tried compiling Fruit under VS 2015 Update 1 but their C++11 implementation is still buggy (it has improved a lot since VS 2013 though).
I filed a couple bugs:
https://connect.microsoft.com/VisualStudio/feedback/details/2197110
https://connect.microsoft.com/VisualStudio/feedback/details/2197169
Currently those prevent Fruit from compiling under MSVC.
Once those are fixed, I'll take another look (there might be other bugs/issues that currently don't appear due to those bugs).
from fruit.
I see, thanks.
from fruit.
Hi there,
with the new VS 2015 Update 2 these two bugs should be fixed!
from fruit.
Unfortunately not, both of the bugs above are still reproducible (i.e., not fixed) with VS 2015 Update 2.
from fruit.
Testing with Visual Studio 2015 Update 3 and I'm not seeing those bugs but it fails nonetheless in https://github.com/google/fruit/blob/master/include/fruit/impl/meta/eval.h#L103 with:
1>X:\fruit\include\fruit/impl/meta/eval.h(103): error C2672: 'fruit::impl::meta::staticOr': no matching overloaded function found
1> X:\fruit\include\fruit/impl/meta/eval.h(109): note: see reference to class template instantiation 'fruit::impl::meta::DoEval<MetaFun(MetaExprs...)>' being compiled
1>X:\fruit\include\fruit/impl/meta/eval.h(103): error C2975: 'bs': invalid template argument for 'fruit::impl::meta::staticOr', expected compile-time constant expression
1> X:\fruit\include\fruit/impl/meta/logical_operations.h(39): note: see declaration of 'bs'
from fruit.
It seems that Visual Studio doesn't think the expression is constant even if it's defined with constexpr.
from fruit.
Have there been any successful builds of fruit on Windows using mingw?
from fruit.
I've tried to use mingw 5.3 to build it, but failed.
from fruit.
@xdhmoore, @zgzzbws: I've just committed a change that makes Fruit work with MinGW.
Next steps:
- Set up CI for Windows, to make sure Fruit keeps working.
- Support MSVC when using the Clang frontend.
- Support MSVC with its own frontend (see @fran6co's open PR).
from fruit.
Great, this is helpful, I will try.
from fruit.
Hey, that's great! Thanks! Also, I think our avatars are cousins or something...
from fruit.
from fruit.
This has finally landed in master. These compilers are now supported on Windows:
- MinGW's GCC
- MSVC 2017
With the following limitations:
When compiling with MSVC, Fruit will be compiled as a static library. Compiling Fruit as a dll is not yet supported with MSVC (but it is supported when building with MinGW). This will be fixed as part of issue #30.Update: limitation now removed (see my comment below)- Older MSVC versions (e.g. MSVC 2015) don't work. I have no plans to address this ATM since MSVC 2017 will be (a bit) more widespread by the time the next Fruit version is released, and I'm not too keen in adding complexity to Fruit to workaround MSVC 2015 bugs; the workarounds for MSVC 2017 bugs are not very intrusive. I could however be convinced otherwise if the changes needed to workaround MSVC 2015 bugs are not too intrusive (PR anyone?).
I've also set up CI for both of those, using AppVeyor.
from fruit.
When compiling with MSVC, Fruit will be compiled as a static library. Compiling Fruit as a dll is not yet supported with MSVC (but it is supported when building with MinGW). This will be fixed as part of issue #30.
This limitation has now been lifted (i.e. building Fruit as a dll with MSVC is now supported). It was much easier than expected, I didn't need to fix issue #30 to get there.
from fruit.
Related Issues (20)
- Fruit does not build in Visual Studio Versions 2019, 2022 or 2022 Preview with CMake HOT 8
- what should I do to use a string as an annotion of some bind? HOT 3
- VS2022 Just My Code for Fruit Library fails using CMAKE HOT 6
- Create a fruit::Component by iterating over a list of fruit::Components HOT 7
- Can fruit be used with C language? HOT 2
- Handling lifetimes HOT 6
- Providing non-injected arguments to DI Objects HOT 14
- Build fails with Visual Studio 2022 with C++20 HOT 8
- Fruit with QT HOT 4
- Factories with reference types broken in fruit 3.7.0
- Generic binding? HOT 2
- Defining Factory Functions for Objects with Multiple Constructors HOT 11
- Replace boost HOT 1
- Creating Collections of DI Objects HOT 3
- [Suggestion] ExtractFirstError meta function SHOULD be non-error safe HOT 2
- Can no longer build examples in VS2022 Preview built by Visual Studio, VS CMake builds OK HOT 7
- Examples miss virtual dtor
- bindInstance with copy HOT 13
- Understanding Compiler error messages in Fruit HOT 6
- Adding a special constructor to one implementation of an interface HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fruit.