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 
 
Speech plugin Compile error

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



Joined: 06 Jan 2005
Posts: 24

PostPosted: Wed May 04, 2005 2:06    Post subject: Speech plugin Compile error Reply with quote

I'm getting the following compile errors when trying to compile the speech plug in (version 0.1.6).

Code:
Speech.cpp
<project path>\Speech.cpp(26) : error C2146: syntax error : missing ';' before identifier 'CNWNXBase'
<project path>\Speech.cpp(26) : error C2501: 'NWNX_API' : missing storage-class or type specifiers


This is occuring at this bit of code in Speech.cpp
Code:
NWNX_API CNWNXBase* GetClassObject () {
   return &speech;
}


This is using Microsoft Visual C++ 2005 Express Edition Beta.

I can't seem to see where NWNX_API is defined, is there something missing?
Back to top
View user's profile Send private message
NoMercy



Joined: 03 Jan 2005
Posts: 123
Location: UK

PostPosted: Wed May 04, 2005 4:41    Post subject: Reply with quote

I did a quick fgrep of the _APIs

Code:
Functions/src/Functions/Functions.cpp:FUNCTION_API CNWNXBase* GetClassObject ()
Functions/src/Functions/Functions.h:FUNCTION_API CNWNXBase* GetClassObject();
nwnx_speech/source/Speech.cpp:NWNX_API CNWNXBase* GetClassObject () {
nwnx_vaultster/windows/source/vaultster.cpp:VAULTSTER_API CNWNXBase* GetClassObject ()
nwnx_vaultster/windows/source/vaultster.h:VAULTSTER_API CNWNXBase* GetClassObject ();
ODBC2/src/Odbc.cpp:ODBC_API CNWNXBase* GetClassObject ()
ODBC2/src/Odbc.h:ODBC_API CNWNXBase* GetClassObject ();
Profiler/src/Profiler/Profiler.cpp:PROFILER_API CNWNXBase* GetClassObject()
Profiler/src/Profiler/Profiler.h:PROFILER_API CNWNXBase* GetClassObject();
src/Odbc.cpp:ODBC_API CNWNXBase* GetClassObject ()
src/Odbc.h:ODBC_API CNWNXBase* GetClassObject ();
Time/src/time.cpp:TIME_API CNWNXBase* GetClassObject()
Time/src/timer.h:TIME_API CNWNXBase* GetClassObject();


The thing which jumps out at me is, all of them have a matching header file, apart from the speech. the matching part of timer.h is:

Code:
#ifdef TIME_EXPORTS
#define TIME_API extern "C" __declspec(dllexport)
#else
#define TIME_API extern "C" __declspec(dllimport)
#endif

TIME_API CNWNXBase* GetClassObject();


My guess is you'd be looking for something similar in the speach header, you might get lucky copying that and changing the names, it's nearly identical for every plugin.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Alosynth



Joined: 06 Jan 2005
Posts: 24

PostPosted: Wed May 04, 2005 8:06    Post subject: Reply with quote

I tried what you suggested (replacing time with speech) and got past those errors above. However, after getting past that, several link errors were generated. Though I played with it for a while, I think they are beyond this tinkerers ken. Perhaps I'll come back to when I learn more about C++. Thanks for the help though.
Back to top
View user's profile Send private message
Lanthar D'Alton



Joined: 10 Feb 2005
Posts: 100

PostPosted: Wed May 04, 2005 23:14    Post subject: which code are you using? Reply with quote

My old exe, or jeroen's dll?

You should really just switch to the newest beta (quite stable)

Head here for pics and download :
http://www.nwnx.org/phpBB2/viewtopic.php?t=57&start=45

-Lanthar
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
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