Git Product home page Git Product logo

Comments (5)

ArthurSonzogni avatar ArthurSonzogni commented on July 21, 2024

Thanks for reporting this.
The continuous integration build it on windows and there was no problem:
https://travis-ci.com/github/ArthurSonzogni/FTXUI/jobs/406888815

Are you sure this isn't caused by your usage? Are you just compiling the FTXUI library, or are you compiling your project?

from ftxui.

YuzukiTsuru avatar YuzukiTsuru commented on July 21, 2024

I will confirm it and build example

from ftxui.

robinlinden avatar robinlinden commented on July 21, 2024

This is caused by a conflict with a macro defined in a Windows header: https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-rgb. I ran into the same issue by including an ASIO header before including FTXUI headers.

I would open a PR fixing it, but the options are

  1. #undef RGB which could break user code if adding FTXUI includes.
  2. Change the name of the static function to something like Rgb. Breaking change, but maybe the nicer option?

If you let me know what you think, I can open a PR with a fix. :)

from ftxui.

ArthurSonzogni avatar ArthurSonzogni commented on July 21, 2024

Thanks @robinlinden!

I think this window header you mentioned shouldn't have defined such a macro with this very common name.
I believe option 1 might be worth it to be tried?

A windows header is breaking us, we break it in return? ;-)

from ftxui.

robinlinden avatar robinlinden commented on July 21, 2024

Sounds good, will open a PR in a bit! :) If users really want the macro, they can always move the Windows header to after the line where ftxui's headers are included and everything will work.

from ftxui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.