LINUX.ORG.RU

Подскажите по плюсам.


0

0

g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/paragui -IC:/msys/1.0/lib/sig c++-1.2/include -IC:/msys/1.0/include/sigc++-1.2 -IC:/PROGRA~1/GnuWin32/include/freetype2 -IC:/PROGRA~1/GnuWin32/include -I/usr/local/cross-tools/i386-mingw32ms vc/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -I../Code/library/libThe_Gui.a -W no-deprecated -g -O2 -I/usr/local/cross-tools/i386-mingw32msvc/include/SDL -D_ GNU_SOURCE=1 -Dmain=SDL_main -I/usr/local/cross-tools/i386-mingw32msvc/include/S DL -D_GNU_SOURCE=1 -Dmain=SDL_main -MT ImageDepot.o -MD -MP -MF ".deps/ImageDepot.Tpo" -c -o ImageDepot.o ImageDepot.cpp; \
then mv -f ".deps/ImageDepot.Tpo" ".deps/ImageDepot.Po"; else rm -f ".deps/Image Depot.Tpo"; exit 1; fi
In file included from ./Field.h:24,
from ./map.h:25,
from ImageDepot.h:25,
from ImageDepot.cpp:20:
./Image.h:35: error: ISO C++ forbids declaration of `CImageDepot' with no type
./Image.h:35: error: expected `;' before '*' token
./Image.h:57: error: expected `;' before '(' token
./Image.h:67: error: `CImageDepot' has not been declared
./Image.h:67: error: ISO C++ forbids declaration of `imageDepot' with no type
In file included from ./map.h:25,
from ImageDepot.h:25,
from ImageDepot.cpp:20:
./Field.h:40:1: warning: "ERROR" redefined
In file included from c:/MinGWStudio/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../.. /../include/windows.h:52,
from C:/msys/1.0/include/paragui/paraconfig_win32.h:67,
from C:/msys/1.0/include/paragui/paragui.h:61,
from libraries/tgimage.h:27,
from ImageDepot.h:23,
from ImageDepot.cpp:20:
c:/MinGWStudio/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wingdi.h:3
04:1: warning: this is the location of the previous definition
In file included from ./map.h:25,
from ImageDepot.h:25,
from ImageDepot.cpp:20:
./Field.h:104: error: `CImageDepot' has not been declared
./Field.h:104: error: ISO C++ forbids declaration of `imageDepot' with no type
In file included from ImageDepot.h:25,
from ImageDepot.cpp:20:
./map.h:74: error: `CImageDepot' has not been declared
./map.h:74: error: ISO C++ forbids declaration of `imageDepot' with no type
./map.h:94: error: `CImageDepot' has not been declared
./map.h:94: error: ISO C++ forbids declaration of `imageDepot' with no type
./map.h:106: error: `CImageDepot' has not been declared
./map.h:106: error: ISO C++ forbids declaration of `imageDepot' with no type
make[3]: *** [ImageDepot.o] Error 1


Постарайтесь подсказать, где не прав.
ImageDepot.h имеет вид:
#include "libraries/tgimage.h"

class CImageDepot : public Ctgimage
{
public:
//attributes
char* prefix;
map<string, SDL_Surface*> imageDepot;

Ctgfile* file;

/*
* @short loads all images which are mentioned in the configfile images.conf
*/
void ReadData(void);

public:
/*
* @short Constructor for the CImageDepot class.
*
* @param prefix - pointer to the basic directory path
*/
CImageDepot(char* prefix);

/*
* @short Destructor for the CImageDepot class.
*/
~CImageDepot(void);

/*
* @short Gives the image with the specified path.
*
* @param imagePath - path of the expected image
*
* @return SDL_Surface* - pointer to the expected image
*/
SDL_Surface* Get_Image(char* imagePath);

/*
* @short Gives the basic directory path.
*
* @return char* - pointer to the basic directory path
*/
char* Get_Prefix(void);

};

Ctgimage объявлен в libraries/tgimage.h
Причём этот код под Линуксом собирается нормально.

★★★★★
Ответ на: комментарий от corpus

#include "libraries/tgfile.h"
#include <map.h>
#include <string>

using namespace std;

typedef map<string, SDL_Surface*>::iterator imageIter;

UVV ★★★★★
() автор топика

>Причём этот код под Линуксом собирается нормально.

ну если собирается по Линуксом, то проблемы нет ;)

Pi ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.