Building Activex plugin

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
d0pamine
Posts: 28
Joined: Wed Oct 16, 2002 9:47 pm

Building Activex plugin

Post by d0pamine »

Has anyone been successful building the ActiveX plugin for 2.36? If so, any tips for MSVC2003?

Thanks,
Tom

cwguy
Posts: 8
Joined: Wed Oct 16, 2002 3:42 am

Post by cwguy »

Hello,

I was able to build the ActiveX control from cvs 2005-03-01. I don't have any tips for MSVC2003 because I'm using MSVC6, but, if you are getting linking errors for '__mb_cur_max', '_pctype', and/or 'errno':
1. Create a file called linkerrors.cpp
2. Add linkerrors.cpp to the GP_axctl project (or sln/ Solution or whatever its called in MSVC2003).
3. This is the code to put into linkerrors.cpp:

Code: Select all

extern "C" 
{
    int __mb_cur_max;
    unsigned short* _pctype;
    int errno;
}
Just to make sure it works, don't forget to name that file linkerrors.cpp. That's all I had to do, and it built me a nice little Blender3DPlugin.ocx in /blender/obj/windows !

Unfortunately, because I have the old working plugin already installed, I really have no idea how to test out the one I built myself, so I don't know if it even works. It's probably a matter of unregistering the one I have now and copying to the 'Downloaded Program Files' folder in the Windows directory, but I'm just not sure.

Good luck,
cwguy

d0pamine
Posts: 28
Joined: Wed Oct 16, 2002 9:47 pm

Post by d0pamine »

Thanks! Hopefully that will come in handy someday soon.

Unfortuantely, I am getting a bunch of link errors getting even regular Blender built. Actually, I am using MSVC 7.0, not 7.1

Now I get this kind of thing in a few places:

------ Build started: Project: GP_ghost, Configuration: BlenderPlayer Release Win32 ------

Linking...
Creating library ..\..\..\..\bin\blenderplayer.lib and object ..\..\..\..\bin\blenderplayer.exp
GPG_Application.obj : error LNK2019: unresolved external symbol "public: void __thiscall KX_KetsjiEngine::SetUseFixedTime(bool)" (?SetUseFixedTime@KX_KetsjiEngine@@QAEX_N@Z) referenced in function "protected: bool __thiscall GPG_Application::initEngine(class GHOST_IWindow *,int)" (?initEngine@GPG_Application@@IAE_NPAVGHOST_IWindow@@H@Z)
GPG_Application.obj : error LNK2019: unresolved external symbol "public: void __thiscall KX_KetsjiEngine::SetTimingDisplay(bool,bool,bool)" (?SetTimingDisplay@KX_KetsjiEngine@@QAEX_N00@Z) referenced in function "protected: bool __thiscall GPG_Application::initEngine(class GHOST_IWindow *,int)" (?initEngine@GPG_Application@@IAE_NPAVGHOST_IWindow@@H@Z)


Oh, well.

Tom

cwguy
Posts: 8
Joined: Wed Oct 16, 2002 3:42 am

Post by cwguy »

I understand that you're building the main Blender, but I'd have to say that going with a cvs build is a better choice if you're really trying to build the ActiveX control or all of Blender. Myself, I had problems building blender-2.36 too, and I also got many link errors. The fresh source will always include several updates to projectfiles since the last release, and they usually solve such build errors.

Then again, if you don't want to get a cvs build, to solve the link errors you might want to try adding the 'KX_' libs one by one to your link library includes and see if any of them resolve missing dependencies. Just an interesting observation from your comment:
d0pamine wrote:------ Build started: Project: GP_ghost, Configuration: BlenderPlayer Release Win32 ------

Linking...
Creating library ..\..\..\..\bin\blenderplayer.lib and object ..\..\..\..\bin\blenderplayer.exp
GPG_Application.obj : error LNK2019: unresolved external symbol "public: void __thiscall KX_KetsjiEngine::SetUseFixedTime(bool)" (?SetUseFixedTime@KX_KetsjiEngine@@QAEX_N@Z) referenced in function "protected: bool __thiscall GPG_Application::initEngine(class GHOST_IWindow *,int)" (?initEngine@GPG_Application@@IAE_NPAVGHOST_IWindow@@H@Z)
GPG_Application.obj : error LNK2019: unresolved external symbol "public: void __thiscall KX_KetsjiEngine::SetTimingDisplay(bool,bool,bool)" (?SetTimingDisplay@KX_KetsjiEngine@@QAEX_N00@Z) referenced in function "protected: bool __thiscall GPG_Application::initEngine(class GHOST_IWindow *,int)" (?initEngine@GPG_Application@@IAE_NPAVGHOST_IWindow@@H@Z)
I see that many of the errors are referencing GHOST objects, why not try to include the ghost library, libghost.lib/libghost.a, in the library includes?

In any case, you should go for the freshest source if you want to have the best chance at building...

Again, good luck,
cwguy

Post Reply