Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"min was not declared in this scope" #49

Open
lamnoda opened this issue Jan 9, 2020 · 1 comment
Open

"min was not declared in this scope" #49

lamnoda opened this issue Jan 9, 2020 · 1 comment

Comments

@lamnoda
Copy link

lamnoda commented Jan 9, 2020

In Arduino IDE, when trying to compile the code, and error message, "min was not declared in this scope" pops up. Any Solution?

The Full Error Messages:

Arduino: 1.8.10 (Windows 10), Board: "Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), STM32duino bootloader, 72Mhz (Normal), Smallest (default)"

sketch\I2Cdev_PillPatch.cpp: In static member function 'static int8_t I2Cdev::readBytes(uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)':

I2Cdev_PillPatch.cpp:276:50: error: 'min' was not declared in this scope

         for (uint8_t k = 0; k < length; k += min<int>(length, BUFFER_LENGTH)) {

                                              ^

I2Cdev_PillPatch.cpp:276:54: error: expected primary-expression before 'int'

         for (uint8_t k = 0; k < length; k += min<int>(length, BUFFER_LENGTH)) {

                                                  ^

I2Cdev_PillPatch.cpp:276:54: error: expected ')' before 'int'

I2Cdev_PillPatch.cpp:276:57: error: expected unqualified-id before '>' token

         for (uint8_t k = 0; k < length; k += min<int>(length, BUFFER_LENGTH)) {

                                                     ^

I2Cdev_PillPatch.cpp:693:59: error: expected '}' at end of input

uint16_t I2Cdev::readTimeout = I2CDEV_DEFAULT_READ_TIMEOUT;

                                                       ^

C:\Users\dogsp\Desktop\Relativ-master\STM32\STM32_BlackPill\STM32_BlackPill.ino: In function 'void setup()':

STM32_BlackPill:48:14: error: 'class TwoWire' has no member named 'setSDA'

     Wire.setSDA(PB7);

          ^

STM32_BlackPill:49:14: error: 'class TwoWire' has no member named 'setSCL'

     Wire.setSCL(PB6);

          ^

Multiple libraries were found for "Wire.h"
Used: C:\Users\dogsp\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2019.12.31\libraries\Wire
Not used: C:\Users\dogsp\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2019.12.31\libraries\WireSlave
exit status 1
'min' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

@fa1ke5
Copy link

fa1ke5 commented Jan 12, 2020

You need selecting proper sdk and board in arduino, read wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants