Previous Thread  Next Thread

chat icon How to compile Blender as a mingw32 DLL ?

monsieurouxx

Posted: Mon Apr 30, 2012 2:28 pm
Joined: 19 Oct 2011
Posts: 18
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.5/Doc/Building_Blender/Windows/MinGW/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?
Reply with quote


monsieurouxx

Posted: Mon Apr 30, 2012 3:37 pm
Joined: 19 Oct 2011
Posts: 18
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.
Reply with quote


monsieurouxx

Posted: Mon Apr 30, 2012 4:52 pm
Joined: 19 Oct 2011
Posts: 18
(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.php?t=14607&highlight=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.
Reply with quote


monsieurouxx

Posted: Tue May 01, 2012 9:24 am
Joined: 19 Oct 2011
Posts: 18
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)
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group