I HAVE MADE FIRE: CrossCompiled Plugins for Windows
I post in hope that someone else can avoid my torture on building plugins for Breve. These problem were based on my low level experience with building dll, some problems because breve does not support a Windows-comaptible plugin-library and some bugs within the examples itself. The last mentioned are fixed, my work with the actual version 2.4 is very satisfying.
Now for those who have still problems. For this guide I assume the following:
* You have Breve 2.4 installed
* You want to build Plugins for the Windows Distribution of Breve (DLLs)
* You are willing to crosscompile via Cygwin and MinGW
1.
The need for crosscompiling lies in the support of the brevePlugin.a. This is a library compareable to a .lib in the windows world. Because a windows compiler can't use this you need a unix-emulator from which you use the .a Library but build a DLL for windows systems.
This emulator is Cygwin:
http://www.cygwin.com/
During the setup be sure to install the MinGW crosscompiler, that will be used instead of the gcc compiler. The advantage in MinGW are:
- I only got it running with it =)
- it can compile dlls without the need of a further library layer
("cygwin.dll").
2. From within Cygwin go into the "\plugins\samples" folder. Now tehre are two choices:
- change the makefile so it will use your MinGW compiler (not gcc).
- or (like me) you have further problems using the makefile and do it
manually:
assume that:
- mingw32-g++ is my compiler
- sample.cpp is the source file of my plugin
- plugin.dll will be the name of my resulting dll
- the plugin library (brevePlugin.a) is one directory higher (like it is by default)
mingw32-g++ -I.. -c -o sample.o sample.cpp dlltool -z sample.def sample.o mingw32-g++ -shared -o plugin.dll sample.o sample.def ../brevePlugin.a
This will produce some files only needed for the linking process (the .o and the definition file). If all compiled/linked without problems you have the plugin.dll which only has to be posted within your project directory.

I HAVE MADE FIRE: CrossCompiled Plugins for Windows
Thanks for posting your experience with this. I apologize that the whole process is biased towards the UNIX user experience and is not as clear for a Windows person.
I will review your notes and the current documentation and make changes so that the process is easier to follow in the future.
- jon
I HAVE MADE FIRE: CrossCompiled Plugins for Windows
Im currently very happy, especially that your 2.4 version comes just in time.
I also saw that you have worked on the minor but confusing bugs regarding the plugins (e.g. the missing return type in the cSample.c for the exported method).
The main problem during the search for some good resources on cross compiling is that a unix/linux guy doesn't care about cygwin and cross compiling whereas a windows programmer does nothing know about linux compiling .. :?
Btw: Is there any wishes list for the next version?
Urgent help needed to run cSampleDemo.tz by using MinGW
Hello Serethos,
I am facing a problem.
Problem: Builduing and linking plugin program.
I have the following tools.
1) I have MinGW
2) I want to run cSample.cc or c++Sample.cc which comes through
breveIDE_2.7.2
Unfortunately it does not make cSample_plugin.o
I used the procedure which described in Breve Documentation
1) http://www.spiderland.org/node/2774
That is g++ -c cSample.cc
Result: It successufully make cSample.o file
2)http://www.spiderland.org/node/2777
Tha is I used: ld -shared cSample_plugin.o cSample.o breveIDEPlugin.lib
Result: Unfortunately it shows the following two errors
a)undefined reference to 'brNewBreveCall'
b)undefined reference to 'printf'
Finally when I tried to run cSampleDemo.tz it shows that it does cSampletest
not found and it also does not get cSample_plugin.o(its true because it did
not create..I explaind before)
Could you please explain me or advice me the procedure to run the
sample(cSample.c and cSampleDemo.tz file ..comes through breveIDE_2.7.2)
This is related with my thesis. So urgent help will necessary. My e-mail
address is sagar_315@yahoo.com. If possible send through my mail. Thanks in
advance.
Sincerely,
Jahangir
MSc student in IT,
Stuttgart University,Germany.
Mobile: +49 176 21 70 98 68