logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Problem with create new NWNX plugin

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
razoon



Joined: 14 May 2008
Posts: 2

PostPosted: Wed May 14, 2008 12:25    Post subject: Problem with create new NWNX plugin Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Wed May 14, 2008 15:55    Post subject: Reply with quote

You need Visual Studio 6 to compile NWNX2 sources.
And don't forget to include <windows.h> in your headers.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
razoon



Joined: 14 May 2008
Posts: 2

PostPosted: Wed May 14, 2008 22:13    Post subject: Reply with quote

thx i used Visual Studio 2008 .net and it works
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group