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 
 
Could use some developer help

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
sstacha



Joined: 08 Nov 2006
Posts: 3

PostPosted: Fri Jan 05, 2007 23:04    Post subject: Could use some developer help Reply with quote

Hi,

I was trying to take a crack at a plugin since I need the hashset stuff. I think I got my development envrionment right except the wxwidget stuff (which I found a post indicating I didn't need to worry about it if I just wanted to link to src/lib). I tried to rebuild the project and the build worked but when I tried to copy my built files to the game server and run it I got this message:

The system cannot execute the specified program.

I replaced all the files with the ones from the 1.06 prototype download except the time.dll where I left my rebuilt version and I got the following in the nwnx log:

NWN Extender 4 V.0.0.6
(c) 2006 by Ingmar Stieger (Papillon)
visit us at http://www.nwnx.org

* Loading plugins...
* Loading plugin xp_mysql.dll: Successfully registered as class: SQL
* Loading plugin xp_time.dll: Error 14001. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
* NWNX4 activated.

I am a very good java developer but I am falling back to my c++ days in school about 10+ years ago. This looks to me like something in my environment / build config. Any developers out there seen this before and might be able to get me through this?

There are a couple of bits of info that might be helpful:
I downloaded the development stuff on my laptop at work and it is a different processor type than my game machine at home that I am trying to run it on(AMD w/xp vs Intel w/xp). I don't think that should matter but it might. I used vc8 express and the platform sdk following the install instructions on the pages from paps blog. I confirmed that i could build a win32 app and run it on the laptop before continuing. As I mentioned I did not successfully get the wxwidgets stuff set up but again I don't think that should matter if I linked to the ones in the src/lib directory (which appeared to be the checked in projects default).

Thanks in advance.
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Jan 06, 2007 15:58    Post subject: Reply with quote

You probably built the solution in "debug" mode. Try it in release mode, and the executeables should work on your game server PC !
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Fri Aug 24, 2007 18:50    Post subject: Reply with quote

well that's exactly the thread i've been wanting.

So building my plugin with a VS 2005 Pro environnment does'nt suits.. (cuz of some sp1 issue that i might had...)
so i desintalled it.

instead i went to install vs c++ express, and i've added the platform sdk.
just as it was told.
and I can, once again, build a win32 app without any problem. (

But went it comes to building a nwnx4 plugin, it's still the same as before...

the plugin works like a charm at home (where i build it) but won't launch on the game server machine.
with the same log as usual
Quote:
"Error 14001. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. "


And I build as a release not as debug...


So, do i need those widgets to get it to work ??
the fact is that rebuilding (for release) any other nwnx4 plugin (such as time or mysql) ends up with the same issue.

i'd appreciate any help on this... otherwise, well i'll have the plugin build on the server machine, and won't ever share it.. lol...
(my messenger adress is available on my profile i needed)
Back to top
View user's profile Send private message MSN Messenger
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Fri Aug 24, 2007 19:25    Post subject: Reply with quote

additionnal infos :

I ran Depends.exe on a home build dll, and it tells that somme dependencies are missing.

MSVCP80.DLL and MSVCR80.DLL.
Those c and c++ runtime library are also dependencies for the nwnx4 dist plugins, but it's seems to cause no pain... lol.

So maybe that's the issue... however, i just dunno how to fix it. Embarassed
Back to top
View user's profile Send private message MSN Messenger
PhyrPhly



Joined: 16 Jun 2007
Posts: 25

PostPosted: Fri Aug 24, 2007 19:56    Post subject: Reply with quote

It sounds like your dll is using the SP1 runtime (even though you have uninstalled it). To verify, you can install the SP1 redistribution pack (below) on your server machine (it's painless to uninstall, if you want, when you're done). If your dll runs without the "Error 14001", then your developement environment is most likely still set up for the SP1 version of the runtime.

Microsoft Visual C++ 2005 SP1 Redistributable Package

- PhyrPhly
Back to top
View user's profile Send private message
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Fri Aug 24, 2007 20:12    Post subject: Reply with quote

I gonna give it a try though it doesn't sound like a solution..
Actually those runtime dll already are on the server machine...

Seems to me, the problem comes from my building environment...

And who'd like to get a nwnx4 plugin which requires you to install fourth party things when "classic" plugins don't...
Back to top
View user's profile Send private message MSN Messenger
PhyrPhly



Joined: 16 Jun 2007
Posts: 25

PostPosted: Fri Aug 24, 2007 20:47    Post subject: Reply with quote

Carter_DC wrote:
Seems to me, the problem comes from my building environment...
That's what I was trying to imply. Wink I believe your dll was built dynamically linked to the SP1 runtime. Your server (most likely) does not have that RT as it doesn't come in any regular Windows update. Installing the redistributable package on your server will verify if that is the problem with running your dll. If it is the problem, we can start looking at your development environment to resolve the issue.

- PhyrPhly
Back to top
View user's profile Send private message
PhyrPhly



Joined: 16 Jun 2007
Posts: 25

PostPosted: Fri Aug 24, 2007 20:55    Post subject: Reply with quote

Unless someone else beats me to it, I'll post the version numbers for the C/C++ runtime dlls for both SP1 and non-SP1. Even though you may not have installed SP1 for VS 2005 Express, you may have the newer runtime libraries.

- PhyrPhly
Back to top
View user's profile Send private message
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Fri Aug 24, 2007 21:53    Post subject: Reply with quote

ok, i'm building the wxwidgets libs right now....
in an hour, i'll be able to say if te problem comes from this side...

if it still doesn't do the trick, well, i'll install the runtime package to test your option.

Be sure that i'll be back to give news bout all that, for i really want my plugin to be on the contribution page ! Wink
Back to top
View user's profile Send private message MSN Messenger
PhyrPhly



Joined: 16 Jun 2007
Posts: 25

PostPosted: Fri Aug 24, 2007 22:03    Post subject: Reply with quote

Did you rebuild wxWidgets after you moved from VS 2005 Pro to VS 2005 Express?

- PhyrPhly
Back to top
View user's profile Send private message
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Fri Aug 24, 2007 23:02    Post subject: Reply with quote

[quote=sstacha]As I mentioned I did not successfully get the wxwidgets stuff set up but again I don't think that should matter if I linked to the ones in the src/lib directory (which appeared to be the checked in projects default). [/quote]

well i figured out the same... not wantiing to get those unexplained widgets... but that's a mistake.

the fact is that i took the chance (and the time) to give em a try... and guess what...

It' alive ! ALIVE !!
(hum sorry)

the fact that the wxwidgets are available on the nwnx4 snv is tricky...
cause when you build your project inside the nwnx4 solution, it compile very well... and runs on your machine...

But, if you try and compile your plugin project outside of the nwnx4 solution, you get link errors related to .... the wxWidgets.

A quick briefing for those of you not wanting to make the same mistakes as I did :

once you got rid of the vs c++ express thing...
u can download the psdk... no need to go by the genuine windows checker to get it (that the link to the sdk from the vs express page).. it's available without any boring stuffs, at microsoft's : http://www.microsoft.com/downloads/details.aspx?familyid=EBA0128F-A770-45F1-86F3-7AB010B398A3&displaylang=en
16 parts of 25Mo each...

then, papillon just spoted the right things to do with it (modifications of win32 app wizard properties , include files and so on.. )

then comes the funny part...

the wxWidgets...
there's a neat step-by-step-guide to them (spent some time searching it!)
here it is : http://www.wxwidgets.org/wiki/index.php/Microsoft_Visual_CPP_Guide#Building_Single_Configurations

Anyway, basicaly, what you need if your on windows is this : the wxWidget Setup exe available at sourceforge http://sourceforge.net/project/showfiles.php?group_id=9863&package_id=14078

you'll prefer using the setup thing, since it automatically add an environment variable that's needed. (otherwise, refer to the guide).

Once the setup's done.. you're not..

for, you surely have the includes, but none of the libs..
and guess what, you'll have to build them..

you may need other thing for your own projects, but for nwnx4 plugins, all you need is ANSI Static Libraries.

so you'll find a projet/solution in your widgets directory\build\msw, called wx.dsw (the wx_dll.dsw is to build the dynamic type).

open this project and build each underlying project one by one...

the order seems to be somewhat important so :
Quote:
wxjpeg
wxpng
wxtiff
wxzlib
wxregex
wxexpat
base
net
odbc
xml
core
gl
html
media
qa
adv
dbgrid
xrc
aui
richtext


Exclamation In the solution's configuration manager,you'll find diffrent build options..
the one you'll need are the standard debug (for debug builds of your plugins) and the standard release (for hum... your plugins releases.. )

So now you've got every thing built..

you can add your newly filled up lib folder to the lib list of your vs express.

last but not least, there's a setup.h somewhere in the "\lib\vc_lib\msw\wx" folder.. just copy it to the include folder and you're done...

your nwnx4 plugin should now be able to compile outside of the nwnx4 solution and be much more portable... Wink

hope that'll help people like myself who are not really used to that kinda things but are still willing to help te community with new ideas in the forms of a nwnx4 plugin.


Last edited by Carter_DC on Sat Aug 25, 2007 14:47; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
kungfoowiz



Joined: 12 Oct 2006
Posts: 61

PostPosted: Sat Aug 25, 2007 9:58    Post subject: Reply with quote

SP-1 shouldn't be installed.
It's the normal one that you need. Click here to download it.
Back to top
View user's profile Send private message
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Wed Aug 29, 2007 13:16    Post subject: Reply with quote

Actually, wit the links i posted it works perfectly fine.

I should have added that, a plugin compiled within the nwnx4 solution seens not to be portable.
But the same plugin built on his own outside the nwnx4 solution is (portable).

had the case this morning with someone enable to use the spawn plugin.
recomplied it outside of the nwnx4 solution, and works now on his module and own computer.
Back to top
View user's profile Send private message MSN Messenger
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Tue Sep 04, 2007 22:14    Post subject: Reply with quote

I think an apology is in order.

I've recompiled the wxWidgets libraries with the original Visual Studio release (without SP1), but never submitted this version to the repository. So your dependency came from the fact that you compiled against the SP1 wxWidgets version. I am currently updating the repository with the "downgraded" version of wxWidgets.

So, sorry !

Btw, is there something missing in the development environment instructions (and the linked threads) ? If so, please point it out and I'll gladly add it to those threads.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> 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