Skip to content

Conflict with WiFi library on Arduino Giga R1 #188

@jacopo-arcari

Description

@jacopo-arcari

Problem

I'm trying to use the library on an Arduino Giga R1 with the WiFi library, but when I try to compile, I get the following error:

.pio\build\giga_r1_m7\lib4ec\libSocketWrapper.a(http_parser.c.o): In function `http_parser_url_init':
http_parser.c:(.text.http_parser_url_init+0x0): multiple definition of `http_parser_url_init'
.pio\build\giga_r1_m7\lib60c\libArduinoHttpClient.a(http_parser.c.o):http_parser.c:(.text.http_parser_url_init+0x0): first defined here
.pio\build\giga_r1_m7\lib4ec\libSocketWrapper.a(http_parser.c.o): In function `http_parser_parse_url':
http_parser.c:(.text.http_parser_parse_url+0x0): multiple definition of `http_parser_parse_url'
.pio\build\giga_r1_m7\lib60c\libArduinoHttpClient.a(http_parser.c.o):http_parser.c:(.text.http_parser_parse_url+0x0): first defined here
.pio\build\giga_r1_m7\lib4ec\libSocketWrapper.a(http_parser.c.o): In function `http_parser_version':
http_parser.c:(.text.http_parser_version+0x0): multiple definition of `http_parser_version'
.pio\build\giga_r1_m7\lib60c\libArduinoHttpClient.a(http_parser.c.o):http_parser.c:(.text.http_parser_version+0x0): first defined here
  • PlatformIO 3.3.4
  • ArduinoHttpClient 0.6.1
  • WiFi 1.0

To reproduce

  1. Create a platformIO project with the following platformio.ini file
[env:giga_r1_m7]
platform = ststm32
board = giga_r1_m7
framework = arduino
lib_deps =
	arduino-libraries/ArduinoHttpClient@^0.6.1
  1. Create the following main.cpp file
#include <Arduino.h>
#include <WiFiClient.h>
#include <ArduinoHttpClient.h>

void setup() {
  WiFiClient client;
  HttpClient httpClient(client, "example.com", 80);
}
void loop() {}

  1. Build

Note: If I use version 0.5.0 or below, it compiles without any problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions