View previous topic :: View next topic |
Author |
Message |
Alosynth
Joined: 06 Jan 2005 Posts: 24
|
Posted: Wed May 04, 2005 2:06 Post subject: Speech plugin Compile error |
|
|
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 |
|
|
NoMercy
Joined: 03 Jan 2005 Posts: 123 Location: UK
|
Posted: Wed May 04, 2005 4:41 Post subject: |
|
|
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 |
|
|
Alosynth
Joined: 06 Jan 2005 Posts: 24
|
Posted: Wed May 04, 2005 8:06 Post subject: |
|
|
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 |
|
|
Lanthar D'Alton
Joined: 10 Feb 2005 Posts: 100
|
|
Back to top |
|
|
|