Problem including due_can library and with Generic ESP8266 board

Hi everyone can you please help me? I'm new to this forum and to Arduino in general.

I'm trying to read can message with an Arduino Due board and send them to a PC via Wi-Fi using a ESP8266 board.
I've successfully write and tested the code to read and store CAN message.
Now I'm trying to connect to a Wi-Fi network using library

#include <ESP8266WiFi.h>

And to do that I use my Arduino Due as a Generic ESP8266 board following this guide:

The problem is that when I try to compile my sketch using Generic ESP8266 board instead of Arduino Due i got this warning and this error:

WARNING: library due_can claims to run on (sam) architecture(s) and may be incompatible with your current board which runs on (esp8266) architecture(s).


error: 'Can' does not name a type
  Can* m_pCan ;

Thank you very much for your help!
Have a good day.

fral:
I use my Arduino Due as a Generic ESP8266 board

That's incorrect. You're using your Due as a USB to TTL serial adapter to program an ESP8266.

fral:
The problem is that when I try to compile my sketch using Generic ESP8266 board instead of Arduino Due i got this warning and this error:

The Due's microcontroller has hardware support for CAN. The ESP8266 does not. Your code (or the due_can library it uses) appears to be using software features that are specific to the Due. Although you may be able to work with CAN via software on the ESP8266, it's unlikely you will be able to use the due_can library.

Thank you very much for your reply, I really appreciate it!
So in your opinion I should look for some libraries for ESP8266 board to read CAN ? Or use an CAN shield?

Unfortunately I have absolutely no experience with CAN. Maybe someone else here will have some advice for you.

Are you thinking of connecting the CAN shield to the ESP8266 board?

Did you have a particular CAN shield in mind?

For now I've always use Arduino DUE to read the CAN bus.
Looking on the web I've found some tips for ESP32 and MCP2515: WiFi + MCP2515 (CAN over SPI) = nightmare · Issue #1670 · espressif/arduino-esp32 · GitHub
Maybe I could use a ESP32 instead of ESP8266 and use the MCP_CAN_lib library, I just need a simple web-server, so ESP32 should works.