I have stripped this down to nothing but the meat to make sure that i'm not going nuts for no reason.
I have my.ino file as such
#include <my_lib.h>
void setup()
{
Serial.begin(115200);
Serial.println("hello world");
}
void loop()
{
}
It references a library stored in "my documents/Arduino/libraries/mylibrary" which contains my_lib.h and my_lib.cpp
#ifndef MY_LIB_H
#define MY_LIB_H
#include <Arduino.h>
#include "WiFi.h"
#include <WiFiClient.h>
#include <WiFiAP.h>
#include <string.h>
#include <ESP32Ping.h>
int addTwoInts(int a, int b);
#endif
Is a pretty standard header file, I also have a pretty standard .cpp file
#include "my_lib.h"
#include "WiFi.h"
#include <WiFiClient.h>
#include <WiFiAP.h>
#include <string.h>
#include <ESP32Ping.h>
int addTwoInts(int a, int b)
{
return a + b;
}
I literally have no idea what I'm doing wrong as it doesn't get simpler than this.
ESP32Ping.h is located in a folder within my libraries folder. With my working .ino (I am trying to turn my .ino into a library file) the library worked. I also have doubts wether to be using "wifi.h" or <wifi.h>