[PD-dev] How compile an external with mingw ?

TotoEtLiTiti totoetlititi at free.fr
Fri Oct 15 18:46:31 CEST 2004


Thanks !
Now I use mingw developper studio (I prefer what is open source... !).
I can compile with no problem but I can't load it.... again !
In my project I have source.c (the first example of the tutorial, the
"helloworld") and a new header file def.h with:

#define export __declspec (dllexport)
export void helloworld_setup();

I can build the library with no problem, but the result is
"helloworld.lib.a"...
It's not a dynamic library, is it ?
I try to rename it and to move it in pd, but I have this beautifull error:
"the DLL c:\pd\extra\helloworld.dll is not an avaible image of window" (it s
bad translation, the original is: "L'application ou la DLL
c:\pd\extra\helloworld.dll n'est pas une image Windows valide."
Why ?
Must I use "extra linking option" in minGW ?
What are this options ?

And again... thanks for all !

Thomas Goepfer

> Using VC you must "export" the setup function, either in the source code
> file with something like
>
> __declspec(dllexport) void helloworld_setup()
> {
>     .... init stuff
> }
>
> or when linking at the command line with
> link /dll /export:helloworld_setup ....................
>
> best greetings,
> Thomas
>
>





More information about the Pd-dev mailing list