Giter VIP home page Giter VIP logo

Comments (3)

cyborgdennett avatar cyborgdennett commented on August 10, 2024

One way to fix it is by doing

#ifdef EPOXY_DUINO
#define int int16_t
#endif

in your header file, but it will break the libraries you use. Any way to 'inject' it into other libraries?

from epoxyduino.

bxparks avatar bxparks commented on August 10, 2024

EpoxyDuino is not meant to be a perfect simulator of an AVR microcontroller. It aims to support the Arduino API under a Unix environment. The sizeof(int) is not defined by the C/C++ language, but is implementation defined. This means that the sizeof(int) is the size given by the C++ compiler under Unix, which is 4, which happens to be the same in all Arduino environments except for AVR. I mention this potential issue with EpoxyDuino at the top of the README (https://github.com/bxparks/EpoxyDuino).

If you have code that assumes sizeof(int) == 2, it is non-portable code and will not work under EpoxyDuino. If you have control over that code, the solution is to change it explicitly to int16_t, so that it becomes portable. If you don't have control over that code, then you will need to fork it and fix it, and maybe upstream it to the original author of that library.

from epoxyduino.

bxparks avatar bxparks commented on August 10, 2024

Added an explicit note in the 'Bugs and Limitations' section in the README.md.
Closing as Won't Fix.

from epoxyduino.

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.