How to compile plugins?

I followed the steps described here, to make a generic texture plugin:

http://download.blender.org/documentation/htmlI/ch27.html

but it doesn’t work. When I use the command:

lcclnk -DLL sinus.obj c:\blender\plugins\include ex.def

I get this error:

Specified export _hnoise is not defined
Missing exports. Aborting

It works, when I remove the keyword hnoise from the tex.def file. But I’m not able to open the plugin in Blender 2.49. Neither in the 32 bit version, nor the 64 bit version.

I’m good at programming, but I’m totally new to that whole dll stuff. Can someone help me, please? I am using Windows Vista x64 duck.

Hi,
I tried to compile texture plugin before and got a similar problem.
I could solve that problem and wrote a tutorial on my blog in Japanese.

http://render360sideb.seesaa.net/article/116322355.html
http://render360sideb.seesaa.net/article/118360645.html

I wish I can translate it to English, but it’s not easy for me.
So I recommend you another way to compile texture plugins using Microsoft Visual C++ Express.

http://blenderartists.org/forum/showpost.php?p=1047167&postcount=26
http://sites.google.com/site/stephanesoppera/blender

This link’s article was not written by me, but I think it will help you.
Thanks.

I was able to compile it with Visual Studio as described. I was also able to open the dll in Blender. But it still doesn’t seem to work correctly. The texture preview remains black and when I render it, it looks really messed up (actually it looks always the same, no matter how I change the plugin code).

I’ve already spent so much hours on solving this problem… I’m tired of it. Maybe someone else can compile my plugin for me. It generates hexagons with a selectable line width and smoothing radius. Here is a picture I generated using the plugin (yep, I wrote a program just to test it, because I wasn’t able to get it working in blender):
http://files.project-nion.net/hexagon.jpg

Here is the .c file:
http://files.project-nion.net/hexagon.c
It doesn’t support proper anti aliasing at the moment, because I’m not sure how to handle the dxt and dyt data. Feel free to use and/or modify the plugin… as long as I get my compiled version, I’m happy.

I tryed to compile your texture plugin.
I needed a little change to hexagon.c but I can get a working .dll file.

http://render360sideb.up.seesaa.net/data/hexagon_modified.zip

I wish this works on your computer too.
Thanks.

Thank you mato! It works. And even more than that: my own build works now, too. Seems like the plugin specification were out of date. Thanks again for your hint with visual c++ and for your changes! This was making me crazy.