lbussy / LCBUrl

Arduino library for handling URLs
MIT License
7 stars 1 forks source link

Compilation issue #1

Closed labrache closed 4 years ago

labrache commented 4 years ago

Hi ! I have some compilation issue on Uno & Mkr Wifi 1010 (it works on ESP8266):

In file included from arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\bits\char_traits.h:39:0,
                 from arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\string:40,
                 from libraries\LCBUrl\src/LCBUrl.h:29,
                 from tests\lcbUrl\lcbUrl.ino:1:

arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\bits\stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                                        ^

arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\bits\stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                                        ^

Seem like issue is resolved when i change:

#include <string>

to:

#include <string.h>

Could you test that ?

Thanks a lot (Nice library BTW 👍 )

lbussy commented 4 years ago

Let me see if I can find an Uno. Can you share a minimum working example?

labrache commented 4 years ago

The error is raised when i include the library to may code, so this:

#include <LCBUrl.h>
void setup() {
}
void loop() {
}

Raise an error.

I'm on Arduino IDE 1.8.10 My "Arduino AVR Boards" version is 1.8.2

lbussy commented 4 years ago

Well that’s easy enough. :)

lbussy commented 4 years ago

That should do it. Thanks for reporting your issue and the potential solution.