[Bf-committers] Plugins in win32 installation of blender

Stephane SOPPERA stephane.soppera at wanadoo.fr
Sun Jul 16 14:49:08 CEST 2006


Simon Clitherow a écrit :
> Hi,
>
> Yes, this is the way the installer works currently.
>
> We still have some issues with plugins IMHO.  I would prefer to have
> pre-built dlls with the installer, however, my attempts to build a
> working plugin with msvc have been unsuccessful. All documentation
> I've found points to lcc/gcc/dlltool magic.  So, until the plugins
> build with msvc they cannot be included in a scons release.
But they DO build with MSVC!
I found a solution one hour ago and I wrote a page about it:

http://stephane.soppera.googlepages.com/blender

During that process I've also spotted a some issues in plugin source for 
win32:
- externdef.h uses WIN32 that is defined only when you build blender. 
When you compile only with MSVC _WIN32 should be used. So actually all 
function using LIBEXPORT are seen as "extern" and not "extern 
__declspec(dllimport)" when building with MSVC. I've search through MSDN 
but failed to find something that explain the difference between "extern 
__declspec(dllimport)" and "extern". Only "extern __declspec(dllexport)" 
is explained.
- plugin.h declares plugin_tex_getversion, plugin_seq_getversion, 
plugin_getinfo without using "extern __declspec(dllexport)" so you have 
to explicitely specify the symbols to exports when building the plug-in 
(see http://stephane.soppera.googlepages.com/blender for more informations)


> Plugin sources could be included in the installer, however, I'm not
> sure how many windows users are prepared to jump through hoops to
> compile them! :)
I am! ;-) And with correct explanations or maybe a simple nmake file 
they can modify by hand, it's easy to build plugins using the MSVC (I 
personnaly uses the freely available MSVC 7 to build both blender and 
the plugins).

> As a separate issue, scons 'install' is not up to 100% after the
> scons rewrite. My plan is to reintegrate the NSIS installer for next
> release.
ok, I understand.

Stéphane


More information about the Bf-committers mailing list