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 
 
Noob question on compiling Windows DLLs from source

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support
View previous topic :: View next topic  
Author Message
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Mon Mar 28, 2011 8:47    Post subject: Noob question on compiling Windows DLLs from source Reply with quote

Need instructions on how to complie Windows DLLs for NWNX from source.

Downloaded source from SVN.

Installed VS 2008 Express...

From here on, I get lost.

What instructions I can find either are for earlier versions of VS, where most things seem to be named differently and be in different places, or they are for VS2008 and are for creating different types of DLLs.

Amusingly, as a complete noob in Linux, I was able to compile everything for Linux fairly easily - but having worked in Windows for 30 years, Microsoft is confounding me.
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Mon Mar 28, 2011 12:52    Post subject: Reply with quote

some common build errors

Somtimes you will get a build error that says that the path or directory doesnt exist. - Regarding to something like c:\games\

I've noticed that some of the plugins, have a Post Build event, that attempts to copy the dll to the original developers nwn game directory.

Remove this build event, and it gets rid of that error.


Other ones include an error around an #include "afx....h" (cant remember the exact name)
Renaming this include file to be #include "windows.h" solves it for me.
Back to top
View user's profile Send private message
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Mon Mar 28, 2011 15:04    Post subject: Reply with quote

Good info, and thanks for it. If I ever get far enough to get those sorts of build errors, at least I'll know what to look for.

Unfortunately, getting build errors requires I have a clue on getting to the point where I am ready to try building the DLL. It is this that I'm having difficulty with. I have only the vaguest idea of what options to use and what file to start with - and there are enough options that trial and error isn't really a viable method.

I'd really love to make use of the amazing work that people here have done that is over and above the base files that are several years old - but in order for that to happen I either need compiled DLLs or I need to be able to make them.
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Mon Mar 28, 2011 16:20    Post subject: Reply with quote

The entire trunk should compile without errors since Zebranky converted everything to vs2008.

Are you trying to compile a specific plugin?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Mon Mar 28, 2011 16:48    Post subject: Reply with quote

MaxRock wrote:
The entire trunk should compile without errors since Zebranky converted everything to vs2008.

Are you trying to compile a specific plugin?


*chuckle* Yes, I was - mainly because I don't really have any idea what I'm doing.

Trying to compile the entire trunk at once never even occurred to me (not that it would help if I had - I still don't know where I'm supposed to be in VS or what things to do to make it all work).
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Mon Mar 28, 2011 20:21    Post subject: Reply with quote

Open NWNX2.sln in VS. Build menu, Build Solution.

NWNX2.exe will not build in Express Edition, as certain dependencies don't ship with it. Everything else should build fine.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Mon Mar 28, 2011 20:28    Post subject: Reply with quote

There are some things that took me forever to find; one of them is the solution properties.

Double click NWNX2.sln, or open it from within VS. It'll have everything setup to compile and link.
If you only want to build a specific plugin you can right click it in the Solution Explorer -> Project Only -> Re- / Build Only ...

If you right click the solution itself (again in Solution Explorer) you can get to its properties. Then under Configuration Properies->Configuration you can check which projects should build and what configuration (Debug/Release) they use for the build.
Now every time you hit F7 it will build the solutions you have selected.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Tue Mar 29, 2011 0:30    Post subject: Reply with quote

Fantastic - thanks, guys.

I'll give this a shot when I get home from work.
Back to top
View user's profile Send private message
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Wed Mar 30, 2011 4:54    Post subject: Reply with quote

Works like a champ.

Did need to change afxres.h to windows.h, but that was expected thanks to Baaleos. Zebranky and Maxrock's info was the rest of what was needed.

Thanks again, guys.
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 technical support 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