How to compile Blender as a mingw32 DLL ?

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

monsieurouxx
Posts: 18
Joined: Wed Oct 19, 2011 2:45 pm

How to compile Blender as a mingw32 DLL ?

Postby monsieurouxx » Mon Apr 30, 2012 3:28 pm

Hello,

I've followed the instructions from the wiki and am successfully able to compile Blender as a Windows 32-bit executable with mingw32 and C-Make (see at http://wiki.blender.org/index.php/Dev:2 ... inGW/CMake).

However I'm planning on building it as a DLL (still with mingw32). I have my own reasons for this (this DLL is used by another project that is already developed).

Does anybody have tips for me, specific advice or general guidelines before I try?

monsieurouxx
Posts: 18
Joined: Wed Oct 19, 2011 2:45 pm

Postby monsieurouxx » Mon Apr 30, 2012 4:37 pm

I can't seem to locate the part of the Makefile that actually builds blender.exe.
So I can't add the required -dllwrap (minGW) or -shared (gcc) in the right place.

monsieurouxx
Posts: 18
Joined: Wed Oct 19, 2011 2:45 pm

Postby monsieurouxx » Mon Apr 30, 2012 5:52 pm

(sorry for triple-posting but I don't think it's possible to edit past posts?)

By the way I've seen that thread: http://www.blender.org/forum/viewtopic. ... hlight=dll

In the thread, people say it's impossible, but that was a long time ago.

But I'm pretty sure it's possible to compile blender as a dll, since the linux project I'm porting is relying on Blender as a library, and apparently the guy has done it rather easily.
also the new building scripts shipped with Blender make it rather simple.

monsieurouxx
Posts: 18
Joined: Wed Oct 19, 2011 2:45 pm

Postby monsieurouxx » Tue May 01, 2012 10:24 am

Alright thanks this thread can be closed I got my answer. I actually didn't need to bluidBlender as a DLL for the third-party project to bind to it; I only needed to complie it with mingw32 (otherwise the symbols don't get exported)


Return to “Coding Blender”

Who is online

Users browsing this forum: No registered users and 0 guests