Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Trouble compiling simple plugin


From   William Buchanan <william@williambuchanan.net>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Trouble compiling simple plugin
Date   Thu, 26 Jul 2012 20:24:27 -0700

Hi Aaron,

Assuming that the architecture is the same as it is for Mac/Windows, you need to place the file in your personal directory.  The command -sysdir- will give you the file path to that folder.

HTH,
Billy

Sent from my iPhone

On Jul 26, 2012, at 19:59, Aaron Kirkman <ak5791@gmail.com> wrote:

> I'm running Stata 12 SE on a Linux system. I followed the tutorial for
> creating simple plugins at this link:
> http://www.stata.com/plugins/#sect5
> 
> I tried the simple example hello.c:
> 
> #include "stplugin.h"
> STDLL stata_call(int argc, char *argv[])
> {
>    SF_display("Hello World\n") ;
>    return(0) ;
> }
> 
> That compiled fine with this command:
> gcc -shared -DSYSTEM=OPUNIX -fPIC stplugin.c hello.c -o hello.plugin
> 
> According to the -adopath- command, \ado\updates and \ado\base are
> both in the adopath, so I placed the plugin in \ado\base, but running
> 
> program hello, plugin
> 
> just returns an error of "Could not load plugin: .\hello.plugin" and
> "r(9999)" Specifying the plugin directly by appending using returns
> the same error:
> 
> program hello, plugin
> using("/run/media/ak5791/kingstonGB/Apps/Stata12SE/ado/base/ak5791/hello.plugin")
> 
> Am I missing part of the process?
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index