Compile error w5100.cpp:33:13: error: 'SPI_CS' was not declared in this scope

Hi. I have problem with my old program. I write it on arduino ide 1.5 i think and now when i want compile it i get some error and i don’t know where the problem is. The program is simple client to SOAP website. This is my errors:

Compiling debug version of 'WebServiceV078' for 'Arduino Due (Programming Port)'
w5100.cpp:In member function 'void W5100Class::init()
w5100.cpp:33:13: error: 'SPI_CS' was not declared in this scope
:SPI.begin(SPI_CS)
w5100.cpp:In static member function 'static uint8_t W5100Class::write(uint16_t, uint8_t)
w5100.cpp:147:16: error: 'SPI_CS' was not declared in this scope
:SPI.transfer(SPI_CS, 0xF0, SPI_CONTINUE)
w5100.cpp:In static member function 'static uint16_t W5100Class::write(uint16_t, const uint8_t*, uint16_t)
w5100.cpp:168:18: error: 'SPI_CS' was not declared in this scope
:SPI.transfer(SPI_CS, 0xF0, SPI_CONTINUE)
w5100.cpp:In static member function 'static uint8_t W5100Class::read(uint16_t)
w5100.cpp:188:16: error: 'SPI_CS' was not declared in this scope
:SPI.transfer(SPI_CS, 0x0F, SPI_CONTINUE)
w5100.cpp:In static member function 'static uint16_t W5100Class::read(uint16_t, uint8_t*, uint16_t)
w5100.cpp:209:18: error: 'SPI_CS' was not declared in this scope
:SPI.transfer(SPI_CS, 0x0F, SPI_CONTINUE)
Error compiling

I have all needed include:

#include <SPI.h>
#include <flash_efc.h>
#include <efc.h>
#include <DueFlashStorage.h>
#include <EthernetUdp.h>
#include <EthernetServer.h>
#include <EthernetClient.h>
#include <Ethernet.h>
#include <Dns.h>
#include <Dhcp.h>

Maybe someone know what could be a problem.

Verify that you are using correct (version) of SPI.h

How i can verify this?

Ok now problem change. I can't add SPI library to the project. Any idea?

I can't add SPI library to the project.

You have our permission to do that.

Any idea?

You are doing it wrong?

CrazyBaran: Ok now problem change. I can't add SPI library to the project. Any idea?

Can you be more specific? Using what process? Getting any error messages, the IDE acts as adding the library but it does not physically add it etc.

Can you compile "examples -> SPI -> BarometricPressureSensor and run it?

PaulS: You have our permission to do that.

I use option "Add Library-> SPI" and nothing was add to project.

Vaclav: Getting any error messages, the IDE acts as adding the library but it does not physically add it etc.

Can you compile "examples -> SPI -> BarometricPressureSensor and run it?

No errors, when i try to add nothing happen. I don't have examples->SPI in Visual Micro Explorer.

I use option "Add Library-> SPI" and nothing was add to project.

When you use the Add Library menu item to add other libraries, what does it actually do?

It adds a #include statement, or more than one. You have our permission to not use such a lame tool, and just add the needed #include statements yourself.

Hello, I have the same problem, and this is what I did, I have this code, I’m using an Arduino UNO and ethernet shield W5100, works well, now wanted to pass to Arduino DUE, update IDE 1.6.5 to 1.6.6 and the ethernet library was updated, when I want to compile this error appears, I think it must be because the spi.h to due is different for one, can it be?
Thanks for any ideas

Yes, the SPI is different on the Due - go read the documentation.

Hello again, it seems that he was having a problem with updating the Ethernet library, update it by hand and looks set to work, at least compiles without error, thanks