Call a foreign-language function: Difference between revisions

m
Line 1,894:
}</lang>
 
The DLL can be built from '''Visual Studio''', or in the console with <code>cl /LD hilbertmat.c stplugin.c</code>. With '''MinGW''', compile with <code>gcc -shared stplugin.c hilbertmatrix.c -o hilbertmat.plugin</code>. With '''Pelles C''', compile with <code>cc /Tx64-coff /Ze stplugin.c hilbertmat.c /DLL /OUT:hilbertmat.plugin</code>. The DLL must be renamed with the '''.plugin''' extension, and put in a directory visible in [https://www.stata.com/help.cgi?adopath adopath].
 
Declare also an ADO file to call the plugin:
1,336

edits