Libraries, Functions, Struct Data, has incomplete type

Hi All

I'm trying to tied up my code to make is easier to work on. I am moving my functions to a library file, but I can't get one of the functions to recognise struct data

My main sketch

#include <ESP8266WiFi.h>  // 2.4.0 ONLY 
#include <ESP8266WebServer.h>
#include <WebSocketsServer.h>
#include <WiFiUdp.h>
#include <ArduinoJson.h>
#include <FS.h>

/**** My Files ****/
#include "functions.h"

struct DataStuct_t {
  const char* netSSID;
  const char* netPASS;
  ….
} ;

DataStuct_t DataStuct;

My functions.h

/*
  functions.h 
*/

#ifndef functions.h 
#define functions.h 

/************************************
         FUNCTIONS
 ************************************/

bool DisplaySettings(struct DataStuct_t Dat) { 
  
// DO stuff here
  return true;
}

#endif

I get a comply error

sketch\functions.h: In function 'bool DisplaySettings(DataStuct_t)':
sketch\functions.h:69:6: error: 'Dat' has incomplete type
bool DisplaySettings(struct DataStuct_t Dat) {
^
sketch\functions.h:69:29: error: forward declaration of 'struct DataStuct_t'
bool DisplaySettings(struct DataStuct_t Dat) {
^

exit status 1
Error compiling for board WeMos D1 R2 & mini.

But it's declared?

Thanks

Brian

#include "functions.h"

struct DataStuct_t {

What do you notice about the order of these?

AWOL:

#include "functions.h"

struct DataStuct_t {



What do you notice about the order of these?

OH, OK Arduino / IDE not as clever as i thought :slight_smile: Not used to complies that what things in that order

Thanks for such a quick responce

Brian