View previous topic :: View next topic |
Author |
Message |
razoon
Joined: 14 May 2008 Posts: 2
|
Posted: Wed May 14, 2008 12:25 Post subject: Problem with create new NWNX plugin |
|
|
Hi
I want to create new plugin and lear how to do this but i have problem whit compil what i write.
I'm using Microsoft Visual C++ 2005 Express Edition.
I download NWNX Core 2.7-beta4 by virusman
I 've 2 files :
NWNXJezyk.h
NWNXJezyk.cpp
NWNXJezyk.h
Code: |
#include <stdio.h>
#include "../NWNXdll/NWNXBase.h"
class NWNXJezyk : public CNWNXBase
{
public:
NWNXJezyk();
~NWNXJezyk();
BOOL OnCreate(const char *LogFile);
BOOL OnRelease();
char* OnRequest(char *gameObject, char *Request, char *Parameters);
}; |
NWNXJezyk.cpp
Code: |
#include <stdio.h>
#include "NWNXJezyk.h"
BOOL NWNXJezyk::OnCreate(const char* logDir)
{
return TRUE;
}
BOOL NWNXJezyk::OnRelease(void)
{
return CNWNXBase::OnRelease ();
}
char* NWNXJezyk::OnRequest(char* gameObject, char* request, char* parameters)
{
return NULL;
} |
and i have this result :
Code: |
1>------ Build started: Project: Project1, Configuration: Debug Win32 ------
1>Compiling...
1>NWNXJezyk.cpp
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\../NWNXdll/NWNXBase.h(44) : error C2146: syntax error : missing ';' before identifier 'OnCreate'
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\../NWNXdll/NWNXBase.h(44) : error C2433: 'CNWNXBase::BOOL' : 'virtual' not permitted on data declarations
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\../NWNXdll/NWNXBase.h(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\../NWNXdll/NWNXBase.h(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\../NWNXdll/NWNXBase.h(44) : warning C4183: 'OnCreate': missing return type; assumed to be a member function returning 'int'
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\../NWNXdll/NWNXBase.h(72) : error C2146: syntax error : missing ';' before identifier 'OnRelease'
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\../NWNXdll/NWNXBase.h(72) : error C2433: 'CNWNXBase::BOOL' : 'virtual' not permitted on data declarations
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\../NWNXdll/NWNXBase.h(72) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\../NWNXdll/NWNXBase.h(72) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\../NWNXdll/NWNXBase.h(72) : warning C4183: 'OnRelease': missing return type; assumed to be a member function returning 'int'
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\NWNXJezyk.h(10) : error C2146: syntax error : missing ';' before identifier 'OnCreate'
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\NWNXJezyk.h(10) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\NWNXJezyk.h(10) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\NWNXJezyk.h(10) : warning C4183: 'OnCreate': missing return type; assumed to be a member function returning 'int'
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\NWNXJezyk.h(11) : error C2146: syntax error : missing ';' before identifier 'OnRelease'
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\NWNXJezyk.h(11) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\NWNXJezyk.h(11) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\pawelkow\moje dokumenty\visual studio 2005\projects\project1\project1\NWNXJezyk.h(11) : warning C4183: 'OnRelease': missing return type; assumed to be a member function returning 'int'
1>.\NWNXJezyk.cpp(4) : error C2143: syntax error : missing ';' before 'NWNXJezyk::OnCreate'
1>.\NWNXJezyk.cpp(4) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\NWNXJezyk.cpp(5) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\NWNXJezyk.cpp(6) : error C2065: 'TRUE' : undeclared identifier
1>.\NWNXJezyk.cpp(9) : error C2143: syntax error : missing ';' before 'NWNXJezyk::OnRelease'
1>.\NWNXJezyk.cpp(9) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\NWNXJezyk.cpp(9) : error C2086: 'int BOOL' : redefinition
1> .\NWNXJezyk.cpp(4) : see declaration of 'BOOL'
1>.\NWNXJezyk.cpp(10) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>Build log was saved at "file://c:\Documents and Settings\pawelkow\Moje dokumenty\Visual Studio 2005\Projects\Project1\Project1\Debug\BuildLog.htm"
1>Project1 - 22 error(s), 4 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
please help
all files and project : http://oceanic.wsisiz.edu.pl/~kowalsp2/newPlugin.zip |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Wed May 14, 2008 15:55 Post subject: |
|
|
You need Visual Studio 6 to compile NWNX2 sources.
And don't forget to include <windows.h> in your headers. |
|
Back to top |
|
|
razoon
Joined: 14 May 2008 Posts: 2
|
Posted: Wed May 14, 2008 22:13 Post subject: |
|
|
thx i used Visual Studio 2008 .net and it works |
|
Back to top |
|
|
|