lpcware

Problem with header and source files

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Patrick_W on Thu Jun 18 00:16:01 MST 2015
Hey guys,

my code is now large enough to split it up in single header and source files. They all got the following format:

Header Files:



#ifndef  __example_h
#define __example_h

#define something

void foo(void);

#endif


Source Files (example.c):


#include "example.h"

void foo(void)
{
do something
}


The headerfiles are included at the main sourcefile of the project in following order:


#include "chip.h"
#include "stdlib.h"
#include "stdint.h"

#include "example.h"


The problem is that things that are declared in other headerfiles like variables seem to be unknown in example.h and co.
So i get the following error Messages:

error: unknown type name 'uint8_t'
error: 'LPC_SPI' undeclared (first use in this function)

The Headerfiles are all imported into the inc folder and the source files i added to the src folder.
In the project properties i checked:

C/C++ Build/Settings/Tool Settings/Includes   if the specific inc folder is there. Looks correct for me see attached picture

I think i got something wrong with my project properties. May somebody got an advice how to solve this problem.

best regards

Patrick

Attachments

Outcomes