limits.h works on both Due a Uno; limits only works on the Due. No idea if there is a difference between the two.
All bold is considered shouting; and it's annoying to read. This migt be due to the
# in the error messages that you posted; a good reason to post errors using code tags
Ops, sorry. The compiler complains about this statement:
C:\Temp\FF\MoCa\src\lib\timer.h:6:10: fatal error: limits: No such file or directory
It seems to me that this is a compiler issue. Something in the 'environment' is not set correctly or is missing. Both versions 1.8.12/15 have the same behaviour.
I referred to code tags it's the </> button at the top of the reply window on this forum), not to pictures
I can't help you much but there are two totally different tool chains for the AVR boards and the Due; that is where the difference comes in. The AVR one clearly doesn't have limits, the Due one has.
I could not find a file limits for the Due, only limits.h; not being much of a C++ programmer, I don't know how it works.
They are different:
<limits.h> is a C header,
<limits> is a C++ header. If the code uses
<limits>, it probably won't work by replacing it with
On top of that, this is just the first error, even if you fix the
<limits> problem, you'll just get more issues. If the code uses other C++ standard library features, it won't work on an AVR-based Arduino. There are ways to get the standard library working on AVR, but that doesn't guarantee that the code will work as expected or that an Uno will have enough memory.
I understand that
Any idea where I can find the limits file on my PC; I did search the Due 'installation' as well as the AVR 'installation' and only found limits.h.
Agent Ransack to the rescue. In one of my "portable" Arduino IDE installations it's in these directories:
...\portable\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0\xtensa-esp32-elf\include\c++\5.2.0 ...\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2 ...\portable\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3 ...\portable\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1
I also have a portable install (for a Wemos D1) and can find it there in Windows file eplorer. However in my normal install for Due (and AVR), I can't find it
For the Arduino Due, 'limits' is in:
Thank you; I have to get new glasses ( again )
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.