problem with the compiler

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

problem with the compiler

1,006件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tmltml51 on Thu Nov 15 00:34:38 MST 2012
I add a c + + files in my project. when I compile them ,it  would error: expected '=', ',', ';', 'asm' or '__attribute__' before 'JPEGCamera'
my program:
#ifndef JPEGCamera_h
#define JPEGCamera_h


//#include <avr/pgmspace.h>
//#include "WProgram.h"

class JPEGCamera
{
    public:
        JPEGCamera();
        void begin(void);
        int reset(char * response);
        int getSize(char * response, int * size);
        int takePicture(char * response);
        int stopPictures(char * response);
        int readData(char * response, int address);
       
    private:
        int sendCommand(const char * command, char * response, int length);
};

#endif

What are its problems?
how to solve it?
thanks
0 件の賞賛
返信
3 返答(返信)

996件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Nov 15 06:34:46 MST 2012
I just realised that LPCXpresso does not support C++. So, adding C++ files to a C project will not work - it will try to compile with the C compiler.

There are some workarounds to getting C++ to work with LPCXpresso - you will need to search this forum to find them.
0 件の賞賛
返信

996件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tmltml51 on Thu Nov 15 03:56:27 MST 2012

Quote: TheFallGuy
There is nothing obviously wrong with this header file. But that is not what you are compiler being compiled. You are compiling a source file that #includes this header file, and the problem will be in that source file.


thanks for a reply
my  source file format .cpp
What are its problems?
way to solve this problem?

attachment  source..
0 件の賞賛
返信

996件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Nov 15 00:59:56 MST 2012
There is nothing obviously wrong with this header file. But that is not what you are compiler being compiled. You are compiling a source file that #includes this header file, and the problem will be in that source file.
0 件の賞賛
返信