Подключил к своему проекту файл на cpp, а проект не хочет компилироваться. Компилятор не воспринимает слово class.
Может какую глобальную опцию включить надо?
Подскажите кто знает, плиз
Вот фрагмент компиляции:
D:\Work\NetworkAgent\Driver5M>build -cbv
BUILD: Object root set to: ==> objchk
BUILD: /i switch ignored
BUILD: Compile and Link for i386
BUILD: Loading d:\DDKWIN2K\build.dat...
BUILD: Computing Include file dependencies:
BUILD: Examining d:\work\networkagent\driver5m directory for files to compile
d:\work\networkagent\driver5m - 17 source files (7,784 lines)
BUILD: Compiling d:\work\networkagent\driver5m directory
Compiling - dlog.c for i386
vector.h(4) : error C2061: syntax error : identifier 'Vector'
vector.h(4) : error C2059: syntax error : ';'
vector.h(5) : error C2449: found '{' at file scope (missing function header?)
vector.h(30) : error C2059: syntax error : '}'
---
и т.д. - всего 276 errors
Вот это vector.h, на котором он вылетает:
#ifndef _VECTOR_H
#define _VECTOR_H
class Vector
{
private:
void **m_pArray;
int m_Size;
int m_AllocatedSize;
int m_AllocationStep;
void EnsureSize(int RequiredSize);
public:
Vector();
virtual ~Vector();
void Add(void *pItem);
void Set(int index, void* pItem);
void* Get(int index);
void Remove(int index);
void Remove(void *pItem);
void RemoveAll();
int Find(void *pItem);
int Size();
void SetSize(int Size);
};
#endif
---
а это source:
TARGETNAME=driver5M
TARGETPATH=D:\Work\NetworkAgent\Driver5M\bin
TARGETTYPE=DRIVER
DDK_LIB_PATH=D:\DDKWIN2K\libchk\i386
TARGETLIBS=$(DDK_LIB_PATH)\libc.lib
SOURCES=Vector.cpp\
String.cpp\
DLog.c\
DriverMain.c\
FileSystem.c\
LocalNetwork.c\
Process.c\
Utils.c\
Print.c\
NhkUtils.c\
Password.c\
Registry.c\
GetLongFilename.c\
PathComponent.cpp\
PathTemplate.cpp\
ConfigEntry.cpp\
ConfigStorage.cpp
---
Makefile стандартный:
#
# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
# file to this component. This file merely indirects to the real make file
# that is shared by all the driver components of the Windows NT DDK
#
!INCLUDE $(NTMAKEENV)\makefile.def
---
|