Compiling a Plugin...


(S68) #1

Ok, I went

http://www-users.cs.umn.edu/~mein/blender/plugins/plugindoc.html

I downloaded the tiles example and tried to compile.

Under Win with CygWin I tried:


gcc -c -DWIN32 tiles.c
echo EXPORTS > tiles.def
nm tiles.o | grep '^........ [T] _' | sed 's/[^_]*_//' >> tiles.def
ld --base-file tiles.base --dll -o tiles.dll tiles.o /cygnus/cygwin-b20/H-i586-cygwin32/i586-cygwin32/lib/libcygwin.a -e [email protected]
dlltool --as=as --dllname tiles.dll --def tiles.def --base-file tiles.base --output-exp tiles.exp
ld --base-file tiles.base tiles.exp --dll -o tiles.dll tiles.o /cygnus/cygwin-b20/H-i586-cygwin32/i586-cygwin32/lib/libcygwin.a
dlltool --as=as --dllname tiles.dll --def tiles.def --base-file tiles.base --output-exp tiles.exp
ld tiles.exp --dll -o tiles.dll tiles.o /cygnus/cygwin-b20/H-i586-cygwin32/i586-cygwin32/lib/libcygwin.a -e [email protected]  

Which gives an unclean compilation with warning:


ld: warning: cannot find entry symbol _mainCRTStartup; defaulting to 10001000

If I try to load the plugin a ‘Noise’ and another button appears, then everything crashes.

Someone has suggestions?

Thanx in advance,

Stefano


(tHe-IcemAn) #2

Yea, Use LccWin32


(S68) #3

Thx, will give that a try :wink:

Stefano