Created Sat, 13 Feb 2016 02:30:44 +0000 by FredCailloux
Sat, 13 Feb 2016 02:30:44 +0000
I have this LS7366.h file and LS7366.cpp that I am building, in which I define the Class LS7366, with the following line:
// in the header LS7366.h
#if !defined DSPI_PORT
#define DSPI_PORT DSPI0 // Default DSPI port = DSPI0
#endif
#define NON_QUADRATURE 0x00
// and a whole buch of other #define lines ...
class LS7366 {
private: DSPI_PORT DSPIjack ;
and some more code lines ; }
// in the code file LS7366.cpp - Class definition
LS7366::LS7366 ( ) { }
void LS7366::begin () {
and some more code lines ; }
and some more functions defined ...
void LS7366 :: end ( ) {
and some more code lines ; }
I took this template from another working Class so I am pretty sure the layout is OK and yet I am getting a compiler error and I cant figure out what the problem may be. What is the compiler means by "implicitely-declared" ? Where is my mistake ? What needs to be done to correct this compiler error ?
LS7366.cpp:7:20: error: definition of implicitly-declared 'LS7366::LS7366()
Thanks
Sat, 13 Feb 2016 02:44:13 +0000
I found the problem. Forgot to include the line:
class LS7366 {
private: DSPI_PORT DSPIjack ;
public:
LS7366 ( ) ; // Forgot this line in my definition
void begin ( ) ;
void end ( ) ;
I got rit of the error. And now I have another type of compiler error to solve. But that will be part of another investigation and probably another posted question. Cheers everyone :!: