View previous topic :: View next topic |
Author |
Message |
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sat Nov 25, 2006 13:56 Post subject: NWNX4 source code compilation issues |
|
|
Please ask your questions and post your solutions concerning the NWNX4 source code in this thread. _________________ Papillon |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Sun Nov 26, 2006 0:04 Post subject: |
|
|
Got Tortoise SVN, downloaded the source set.
When compiling the Linking step fails... (see below)
My guess is my wxWidgets configuration/installation is messed up.
I'll try again, any suggestions?
**NWNX4 GUI project seems to be missing(?)
Cheers
Gryphyn
Code: | Linking...
wxbase26d.lib(log.obj) : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "void __cdecl wxSafeShowMessage(class wxString const &,class wxString const &)" (?wxSafeShowMessage@@YAXABVwxString@@0@Z)
wxbase26d.lib(appbase.obj) : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
...<snip>...
wxbase26d.lib(crashrpt.obj) : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function "public: __thiscall BusyCursor::BusyCursor(void)" (??0BusyCursor@@QAE@XZ)
D:\NWNX4\src\..\bin\Debug\NWNX4_Hookd.dll : fatal error LNK1120: 49 unresolved externals
|
|
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sun Nov 26, 2006 11:43 Post subject: |
|
|
Do you have the Platform SDK set up and configured as described on the VS Express page (assuming that you are using Express) ?
MessageBoxA for example is a Win32 function.
The GUI project is missing, because it is not ready yet. _________________ Papillon |
|
Back to top |
|
|
kungfoowiz
Joined: 12 Oct 2006 Posts: 61
|
Posted: Mon Nov 27, 2006 16:05 Post subject: |
|
|
Your compilation may fail if you haven't disabled the Post-Build Event. To do this:
Right-click on each project, select Properties, select Configuration Properties, select Build Events, select Post-Build Event, and toggle Excluded From Build to yes.
---
kung |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Tue Nov 28, 2006 22:40 Post subject: |
|
|
kungfoowiz wrote: | Your compilation may fail if you haven't disabled the Post-Build Event. To do this:
Right-click on each project, select Properties, select Configuration Properties, select Build Events, select Post-Build Event, and toggle Excluded From Build to yes.
---
kung |
No, I want the Post-Build Event, this copies the files to the 'dist' (distribution?) folder. This bit's working fine.
I've reinstalled C++Express, wxWidgets and vsSDK. Still the same issue.
Standard Windows calls (to libraries) are failing when called via wxWidgets libraries. I'm pretty sure this is a problem with my wxWidgets setup - was there anything special you tweaked when setting this up?
I've tried C++Express & Full VStudio2005 - both with the same results.
Cheers
Gryphyn |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Tue Nov 28, 2006 22:45 Post subject: |
|
|
If this is still happening in a few hours, I can take a look -- but this sounds really familiar from another project I've worked on. Is there an option to enable/disable 'use default libraries' at the project level? _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue Nov 28, 2006 22:46 Post subject: |
|
|
Hmm, since you mentioned wxWidgets: Did you compile the libs yourself ?
Because if you downloaded the libs\ directory from the repository, you already have what you need, and can skip the wxWidgets part. _________________ Papillon |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Wed Nov 29, 2006 1:38 Post subject: |
|
|
Papillon wrote: | Hmm, since you mentioned wxWidgets: Did you compile the libs yourself ?
Because if you downloaded the libs\ directory from the repository, you already have what you need, and can skip the wxWidgets part. |
Tried Both...
I had assumed you had all that was needed in the 'source' already.
That didn't work...
OK. Got it... at least something I can live with...for the moment...
Drive dependancy.
Normally I have my work on my 'development' drive "D:\..."
--Installed everything on my 'test' machine to the "C:\" drive (and no problems)
Nothing I can see uses absolute file paths, but there must be something buried in wxWidgets somewhere.
So... here's a tip.
Export the source to a folder on your "C:\" drive - to avoid problems.
Cheers
Gryphyn |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Wed Nov 29, 2006 16:27 Post subject: |
|
|
I have everything on my D: drive... _________________ Papillon |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Wed Nov 29, 2006 22:32 Post subject: |
|
|
Papillon wrote: | I have everything on my D: drive... |
That's strange indeed then...
--I'll investigate further... but I've got something that does work
so I'm happy with that for the moment.
Cheers
Gryphyn |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sat Dec 09, 2006 22:45 Post subject: |
|
|
Gryphyn wrote: | Got Tortoise SVN, downloaded the source set.
When compiling the Linking step fails... (see below)
My guess is my wxWidgets configuration/installation is messed up.
I'll try again, any suggestions?
**NWNX4 GUI project seems to be missing(?)
Cheers
Gryphyn
Code: | Linking...
wxbase26d.lib(log.obj) : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "void __cdecl wxSafeShowMessage(class wxString const &,class wxString const &)" (?wxSafeShowMessage@@YAXABVwxString@@0@Z)
wxbase26d.lib(appbase.obj) : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
...<snip>...
wxbase26d.lib(crashrpt.obj) : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function "public: __thiscall BusyCursor::BusyCursor(void)" (??0BusyCursor@@QAE@XZ)
D:\NWNX4\src\..\bin\Debug\NWNX4_Hookd.dll : fatal error LNK1120: 49 unresolved externals
|
| I have the same problem.
kernel32.lib is in place. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sun Dec 10, 2006 11:50 Post subject: |
|
|
What steps did you take in order to solve the compilation problem ? I don't even know what platform you are using... a little more info would be helpful.
Also, there is a guide on making wxWidgets work with Visual Studio: http://www.wxwidgets.org/wiki/index.php/MSVC_.NET_Setup_Guide _________________ Papillon |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sun Dec 10, 2006 17:57 Post subject: |
|
|
I just used the wrong installation of VC. |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Sun Jan 14, 2007 9:15 Post subject: Trying to return a value... and the data encoding changes |
|
|
I'm writing a pluging based on sqlite3.
Code: |
const char* PWData::DoRequest(char *gameObject, char* request, char* value)
{
wxLogTrace(TRACE_VERBOSE, wxT("* Plugin DoRequest(0x%x, %s, %s)"), gameObject, request, value);
<snip>
wxLogTrace(TRACE_VERBOSE, wxT("* Value found"));
size_t bytes = (size_t) sqlite3_column_bytes(sqlStatement, 0);
wxLogTrace(TRACE_VERBOSE, wxT("* "));
wxLogTrace(TRACE_VERBOSE, wxT("* Value Length = %d"), strlen(value));
wxLogTrace(TRACE_VERBOSE, wxT("* Value Size = %d"), sizeof(value));
wxLogTrace(TRACE_VERBOSE, wxT("* Value Data = %s"), value);
wxLogTrace(TRACE_VERBOSE, wxT("* Result Length = %d"), bytes);
const char* pCol = (const char*)sqlite3_column_text(sqlStatement, 0);
if (pCol)
{
nwnxcpy(value, pCol);
//nwnxcpy(value, pCol, bytes);
}
else
{
nwnxcpy(value, wxT(""));
}
wxLogTrace(TRACE_VERBOSE, wxT("* Value Length = %d"), strlen(value));
wxLogTrace(TRACE_VERBOSE, wxT("* Value Size = %d"), sizeof(value));
// wxLogTrace(TRACE_VERBOSE, wxT("* Value Data = %s"), value);
wxLogTrace(TRACE_VERBOSE, wxT("* ")); |
Trace: (TRACE_VERBOSE) * Value found
Trace: (TRACE_VERBOSE) *
Trace: (TRACE_VERBOSE) * Value Length = 1024
Trace: (TRACE_VERBOSE) * Value Size = 4
Trace: (TRACE_VERBOSE) * Value Data = ........................................(1024 of them)
Trace: (TRACE_VERBOSE) * Result Length = 32
Trace: (TRACE_VERBOSE) * Value Length = 4
Trace: (TRACE_VERBOSE) * Value Size = 4
Trace: (TRACE_VERBOSE) *
It's a pretty simple
my result is the correct size,
my value is a pointer(4bytes)
--when nwnxcpy executes it appears that it is copying the 4 bytes of the pointer into my value *not what I want.
Note: I've commented the 2nd Value Data.
This works the first time, but whenever I execute it after nwnxcpy() my entire application no longer recognises UTF8 encoding.
While I'm not proficient in C++, I'm a bit perplexed why a 'follow the example' bit of code is not working for me, let alone the weirdness of losing UTF8.
Any help getting sqlite3_column_text() and nwnxcpy() working together, they don't work together by default, would be much appreciated.
Cheers
Gryphyn |
|
Back to top |
|
|
kungfoowiz
Joined: 12 Oct 2006 Posts: 61
|
Posted: Sun Jan 14, 2007 12:49 Post subject: |
|
|
What does wxLogMessage( value ) say? Scratch that.
This could be a problem:
Code: |
void Plugin::nwnxcpy(char* buffer, const char* response, size_t len)
{
size_t size = strlen(buffer);
...
|
Instead of strlen( .. ), sizeof( .. ) perhaps? |
|
Back to top |
|
|
|