Giter Site home page Giter Site logo

Comments (6)

StevenLeRoux avatar StevenLeRoux commented on August 16, 2024

Ok it may be due to my environment...

I've installed g++ dependency, and I've still an error, but not the same:


  CXX      ColorUtils.lo
In file included from ColorUtils.cpp:21:
ColorUtils.h:103:13: error: 'uint16_t' does not name a type
  103 |             uint16_t r, g, b;
      |             ^~~~~~~~
ColorUtils.h:25:1: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   24 | #include <iostream>
  +++ |+#include <cstdint>
   25 | 
ColorUtils.h:107:13: error: 'uint16_t' does not name a type
  107 |             uint16_t h, s, v;
      |             ^~~~~~~~
ColorUtils.h:107:13: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
ColorUtils.h:111:13: error: 'uint16_t' does not name a type
  111 |             uint16_t h, s, l;
      |             ^~~~~~~~
ColorUtils.h:111:13: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
ColorUtils.h:113:9: error: 'uint16_t' does not name a type
  113 |         uint16_t array[3];
      |         ^~~~~~~~
ColorUtils.h:113:9: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
ColorUtils.h:115:5: error: 'uint16_t' does not name a type
  115 |     uint16_t alpha;
      |     ^~~~~~~~
ColorUtils.h:115:5: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
ColorUtils.h: In member function 'int ColorValue::getAlpha() const':
ColorUtils.h:40:35: error: 'alpha' was not declared in this scope; did you mean 'isalpha'?
   40 |     int getAlpha() const { return alpha; }
      |                                   ^~~~~
      |                                   isalpha
ColorUtils.cpp: In constructor 'ColorValue::ColorValue()':
ColorUtils.cpp:33:5: error: class 'ColorValue' does not have any field named 'alpha'
   33 |     alpha(0)
      |     ^~~~~
ColorUtils.cpp:35:15: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'r'
   35 |     color.rgb.r = color.rgb.g = color.rgb.b = 0;
      |               ^
ColorUtils.cpp:35:29: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'g'
   35 |     color.rgb.r = color.rgb.g = color.rgb.b = 0;
      |                             ^
ColorUtils.cpp:35:43: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'b'
   35 |     color.rgb.r = color.rgb.g = color.rgb.b = 0;
      |                                           ^
ColorUtils.cpp: In member function 'void ColorValue::setAlpha(int)':
ColorUtils.cpp:239:5: error: 'alpha' was not declared in this scope; did you mean 'isalpha'?
  239 |     alpha = a;
      |     ^~~~~
      |     isalpha
ColorUtils.cpp: In member function 'int ColorValue::getRed() const':
ColorUtils.cpp:245:26: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'r'
  245 |         return color.rgb.r;
      |                          ^
ColorUtils.cpp: In member function 'int ColorValue::getGreen() const':
ColorUtils.cpp:253:26: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'g'
  253 |         return color.rgb.g;
      |                          ^
ColorUtils.cpp: In member function 'int ColorValue::getBlue() const':
ColorUtils.cpp:261:26: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'b'
  261 |         return color.rgb.b;
      |                          ^
ColorUtils.cpp: In member function 'void ColorValue::setRed(int)':
ColorUtils.cpp:275:19: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'r'
  275 |         color.rgb.r = red;
      |                   ^
ColorUtils.cpp: In member function 'void ColorValue::setGreen(int)':
ColorUtils.cpp:289:19: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'g'
  289 |         color.rgb.g = green;
      |                   ^
ColorUtils.cpp: In member function 'void ColorValue::setBlue(int)':
ColorUtils.cpp:303:19: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'b'
  303 |         color.rgb.b = blue;
      |                   ^
ColorUtils.cpp: In member function 'void ColorValue::setRgb(int, int, int, int)':
ColorUtils.cpp:321:15: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'r'
  321 |     color.rgb.r = r;
      |               ^
ColorUtils.cpp:322:15: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'g'
  322 |     color.rgb.g = g;
      |               ^
ColorUtils.cpp:323:15: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'b'
  323 |     color.rgb.b = b;
      |               ^
ColorUtils.cpp: In member function 'int ColorValue::getHSVHue() const':
ColorUtils.cpp:329:26: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  329 |         return color.hsv.h;
      |                          ^
ColorUtils.cpp: In member function 'int ColorValue::getHSVSaturation() const':
ColorUtils.cpp:337:26: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  337 |         return color.hsv.s;
      |                          ^
ColorUtils.cpp: In member function 'int ColorValue::getHSVValue() const':
ColorUtils.cpp:345:26: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'v'
  345 |         return color.hsv.v;
      |                          ^
ColorUtils.cpp: In member function 'void ColorValue::setHSVHue(int)':
ColorUtils.cpp:359:19: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  359 |         color.hsv.h = h;
      |                   ^
ColorUtils.cpp: In member function 'void ColorValue::setHSVSaturation(int)':
ColorUtils.cpp:373:19: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  373 |         color.hsv.s = s;
      |                   ^
ColorUtils.cpp: In member function 'void ColorValue::setHSVValue(int)':
ColorUtils.cpp:387:19: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'v'
  387 |         color.hsv.v = v;
      |                   ^
ColorUtils.cpp: In member function 'void ColorValue::setHsv(int, int, int, int)':
ColorUtils.cpp:408:15: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  408 |     color.hsv.h = h;
      |               ^
ColorUtils.cpp:409:15: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  409 |     color.hsv.s = s;
      |               ^
ColorUtils.cpp:410:15: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'v'
  410 |     color.hsv.v = v;
      |               ^
ColorUtils.cpp: In member function 'int ColorValue::getHSLHue() const':
ColorUtils.cpp:416:26: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  416 |         return color.hsl.h;
      |                          ^
ColorUtils.cpp: In member function 'int ColorValue::getHSLSaturation() const':
ColorUtils.cpp:424:26: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  424 |         return color.hsl.s;
      |                          ^
ColorUtils.cpp: In member function 'int ColorValue::getHSLLightness() const':
ColorUtils.cpp:432:26: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'l'
  432 |         return color.hsl.l;
      |                          ^
ColorUtils.cpp: In member function 'void ColorValue::setHSLHue(int)':
ColorUtils.cpp:446:19: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  446 |         color.hsl.h = h;
      |                   ^
ColorUtils.cpp: In member function 'void ColorValue::setHSLSaturation(int)':
ColorUtils.cpp:460:19: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  460 |         color.hsl.s = s;
      |                   ^
ColorUtils.cpp: In member function 'void ColorValue::setHSLLightness(int)':
ColorUtils.cpp:474:19: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'l'
  474 |         color.hsl.l = l;
      |                   ^
ColorUtils.cpp: In member function 'void ColorValue::setHsl(int, int, int, int)':
ColorUtils.cpp:495:15: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  495 |     color.hsl.h = h;
      |               ^
ColorUtils.cpp:496:15: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  496 |     color.hsl.s = s;
      |               ^
ColorUtils.cpp:497:15: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'l'
  497 |     color.hsl.l = l;
      |               ^
ColorUtils.cpp: In member function 'ColorValue ColorValue::toRgb() const':
ColorUtils.cpp:529:37: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  529 |         double h = double(color.hsv.h);
      |                                     ^
ColorUtils.cpp:530:37: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  530 |         double s = double(color.hsv.s) / 100.;
      |                                     ^
ColorUtils.cpp:531:37: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'v'
  531 |         double v = double(color.hsv.v) / 100.;
      |                                     ^
ColorUtils.cpp:537:40: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'v'
  537 |             int vv = (double(color.hsv.v) * 255. / 100.);
      |                                        ^
ColorUtils.cpp:594:37: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'l'
  594 |         float L = ((float)color.hsl.l)/100;
      |                                     ^
ColorUtils.cpp:595:37: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  595 |         float S = ((float)color.hsl.s)/100;
      |                                     ^
ColorUtils.cpp:596:37: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  596 |         float H = ((float)color.hsl.h)/360;
      |                                     ^
ColorUtils.cpp:598:22: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  598 |         if(color.hsl.s == 0)
      |                      ^
ColorUtils.cpp:600:27: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'l'
  600 |             r = color.hsl.l;
      |                           ^
ColorUtils.cpp:601:27: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'l'
  601 |             g = color.hsl.l;
      |                           ^
ColorUtils.cpp:602:27: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'l'
  602 |             b = color.hsl.l;
      |                           ^
ColorUtils.cpp: In member function 'ColorValue ColorValue::toHsv() const':
ColorUtils.cpp:674:33: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'r'
  674 |     double r = double(color.rgb.r * 100. / 255.);
      |                                 ^
ColorUtils.cpp:675:33: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'g'
  675 |     double g = double(color.rgb.g * 100. / 255.);
      |                                 ^
ColorUtils.cpp:676:33: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'b'
  676 |     double b = double(color.rgb.b * 100. / 255.);
      |                                 ^
ColorUtils.cpp: In member function 'ColorValue ColorValue::toHsl() const':
ColorUtils.cpp:730:41: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'r'
  730 |     float r_percent = ((float)color.rgb.r) / 255;
      |                                         ^
ColorUtils.cpp:731:41: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'g'
  731 |     float g_percent = ((float)color.rgb.g) / 255;
      |                                         ^
ColorUtils.cpp:732:41: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'b'
  732 |     float b_percent = ((float)color.rgb.b) / 255;
      |                                         ^
ColorUtils.cpp:786:17: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  786 |     c.color.hsl.s = (unsigned int)(S*100);
      |                 ^
ColorUtils.cpp:787:17: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'l'
  787 |     c.color.hsl.l = (unsigned int)(L*100);
      |                 ^
ColorUtils.cpp:791:17: error: 'struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  791 |     c.color.hsl.h = (unsigned int)H;
      |                 ^
ColorUtils.cpp: In member function 'bool ColorValue::operator==(const ColorValue&) const':
ColorUtils.cpp:823:30: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  823 |             return color.hsl.h == c.color.hsl.h &&
      |                              ^
ColorUtils.cpp:823:47: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  823 |             return color.hsl.h == c.color.hsl.h &&
      |                                               ^
ColorUtils.cpp:824:30: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  824 |                    color.hsl.s == c.color.hsl.s &&
      |                              ^
ColorUtils.cpp:824:47: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  824 |                    color.hsl.s == c.color.hsl.s &&
      |                                               ^
ColorUtils.cpp:825:30: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'l'
  825 |                    color.hsl.l == c.color.hsl.l;
      |                              ^
ColorUtils.cpp:825:47: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'l'
  825 |                    color.hsl.l == c.color.hsl.l;
      |                                               ^
ColorUtils.cpp:829:30: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  829 |             return color.hsv.h == c.color.hsv.h &&
      |                              ^
ColorUtils.cpp:829:47: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'h'
  829 |             return color.hsv.h == c.color.hsv.h &&
      |                                               ^
ColorUtils.cpp:830:30: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  830 |                    color.hsv.s == c.color.hsv.s &&
      |                              ^
ColorUtils.cpp:830:47: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 's'
  830 |                    color.hsv.s == c.color.hsv.s &&
      |                                               ^
ColorUtils.cpp:831:30: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'v'
  831 |                    color.hsv.v == c.color.hsv.v;
      |                              ^
ColorUtils.cpp:831:47: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'v'
  831 |                    color.hsv.v == c.color.hsv.v;
      |                                               ^
ColorUtils.cpp:835:30: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'r'
  835 |             return color.rgb.r == c.color.rgb.r &&
      |                              ^
ColorUtils.cpp:835:47: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'r'
  835 |             return color.rgb.r == c.color.rgb.r &&
      |                                               ^
ColorUtils.cpp:836:30: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'g'
  836 |                    color.rgb.g == c.color.rgb.g &&
      |                              ^
ColorUtils.cpp:836:47: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'g'
  836 |                    color.rgb.g == c.color.rgb.g &&
      |                                               ^
ColorUtils.cpp:837:30: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'b'
  837 |                    color.rgb.b == c.color.rgb.b;
      |                              ^
ColorUtils.cpp:837:47: error: 'const struct ColorValue::<unnamed union>::<unnamed>' has no member named 'b'
  837 |                    color.rgb.b == c.color.rgb.b;
      |                                               ^
make[3]: *** [Makefile:731 : ColorUtils.lo] Erreur 1

from calaos_base.

raoulh avatar raoulh commented on August 16, 2024

Using master it should build fine. What is you build env? (distro, compiler, ...)

from calaos_base.

StevenLeRoux avatar StevenLeRoux commented on August 16, 2024

Hi Raoul, it's a fresh debian trixie from yesterday installed on a Chuwi Larkbox X (powered by Intel n100). It has two ethernet ports which will allow me to separate and isolate communication with Wago PLC.

GCC/G++-13
I followed https://calaos.fr/wiki/fr/compilation except libsigc++ and libuv came as packages directly. Would you recommand any specific version? I see some effort with devcontainers, maybe the way to go?

(For the context, I already have a Calaos OS installed on another setup, but I want to build Calaos to contribute stuff)

from calaos_base.

raoulh avatar raoulh commented on August 16, 2024

Ok. calaos_base builds on debian bookworm as latest ArchLinux. Maybe there is an issue with Debian testing?...

You could try to add the include requested in ColorUtils.h : #include <cstdint>
That should do no harm.

PS: https://calaos.fr/wiki/fr/compilation is not up to date 😓

from calaos_base.

raoulh avatar raoulh commented on August 16, 2024

FYI: this is how we build for Debian 12 in our Dockerfile:

https://github.com/calaos/calaos_base/blob/master/Dockerfile

from calaos_base.

StevenLeRoux avatar StevenLeRoux commented on August 16, 2024

Adding #include <cstdint> did it! Thanks :)

Now I'm setting up a dev env, so I will test with the devcontainers next week. Thanks again for your help, closing.

from calaos_base.

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.