lua-users home
lua-l archive

Re: Printing to terminal/standard output problem

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


Maybe even "typedef struct FILE FILE" should be enough...
There should be no reason for one to wants "struct _IO_FILE" from luajit ffi, or even from normal "C". Too bad "C" has to expose it's internals every once in a while...
But either one works.
On 11/20/11 3:01 PM, Francesco Abbate wrote:
2011年11月20日 PooshhMao<pooshhmao@gmail.com>:
However when I try to run your example I get the error: declaration
specifier expected near 'FILE'
Sorry, I forgot that you need to add in ffi.cdef the following declarations:
 struct _IO_FILE;
 typedef struct _IO_FILE FILE;
Actually I didn't notice the problem because I tested the script in
GSL Shell where they are already declared.
Francesco

AltStyle によって変換されたページ (->オリジナル) /