Novice problem with IDE

Hi,
I am trying to add a file to my sketch and get the following error.

Could not createInput() for C:\Users\Marius\Documents\My Projects\Firmware\Arduino\projects\Rewinder\defines.h
java.io.FileNotFoundException: C:\Users\Marius\Documents\My Projects\Firmware\Arduino\projects\Rewinder\defines.h (The system cannot find the file specified)

This happens if the file is there or not.
Another question. How do I determine which file is included first in the sketch? I want to place all the defines in a separate file to unclutter the code.

I am trying to add a file to my sketch and get the following error.

Can you bring your Windex over and clean by crystal ball? I can't seem to see your code.

How do I determine which file is included first in the sketch?

Well, generally, it is the one you told the compiler to include.

I want to place all the defines in a separate file to unclutter the code.

And, the problem is?

Paul,
The code is included on the post. I can see it. You are not being helpful at all. I am using the Processing IDE for Arduino. I get an error if I include any file other than an PDE file.

The code is included on the post. I can see it.

Well, I can't. All I can see is an error message that makes no sense without the code that generated the error.

You are not being helpful at all.

I can't help you if you don't post code in a way that I can see it. Sorry about that.

I am using the Processing IDE for Arduino.

There is a Processing IDE and an Arduino IDE. The Arduino IDE is used to program the Arduino. The Processing IDE is used to develop applications that run on the PC. They are not even remotely interchangeable.

I get an error if I include any file other than an PDE file.

That's what happens in Processing.

Paul,
I think you misunderstood everything I said from the beginning. Let me explain.

I am using the Arduino IDE (based on the Processing platform).
I have an externally generated file called defines.h that I want to add to the sketch.
There is no code involved in this file, just #defines.
The error that I posted is what happens when I try to add the file.
The rest of the sketch compiles correctly and the code is running, I just want to organize the code in order to make it maintainable.

Hope this clears it up.

Try this.

Make a new tab in the IDE (button on the far-right corner). Call it defines.h. It will open blank. Put your stuff in it. Now compile.

And Paul means you didn't post your (source) file(s). I can't see it/them either. You just posted your error message. He doesn't mean "the error code", he means "the program code".

Thanks Nick,
How do I force the defines.h file to be included first? It contains all the #defines.

Nick,
I included the defines.h file at the top of the main file. The compiler cannot find the file. It reports Rewinder.cpp:1:21: error: defines.h: No such file or directory

If I leave the defines in the main file all is well.

The code

#include <defines.h>
#include <Streaming.h>
#include <EEPROM.h>
#include <NewSoftSerial.h>
#include <Keypad.h>
#include <ctype.h>
#include <stdio.h>

#define KeyUp    1
#define KeyDown  5
#define KeyLeft  6
#define KeyRight 2
#define KeyEnter 3   
#define KeySet   7
#define KeySpeedHigher 9
#define KeySpeedLower  13 
#define KeyRollerIn 10
#define KeyRollerOut  14
#define KeyStart  4
#define KeyPause  8
#define KeyResume 12

#define ledPin 19
#define txPin 6
#define RUN 0
#define STOP 1
#define PAUSE 2
#define uint unsigned int

Now if I remove these defines into the defines.h - no go.

Did you make the tab in the IDE?

The thing is it copies all your files into a temporary directory. Things like the tabs inform it which files to copy.

Try changing it to:

#include "defines.h"

Nick,
You are the MAN!! It works that way. Now I can include some other cpp files as well.