lua-users home
lua-l archive

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


On Friday 22 June 2001 11:54, you wrote:
> > When compiling using the multithreaded run time library, I get
> > lualib.lib(liolib.obj) : error LNK2001: unresolved external symbol _errno
> > 
> > Is there any quick way to get around this?
> 
> Just noticed that the easiest way to get the stuff running is to insert
> 
> extern "C" 
> {
>     int errno;
> }
> 
> into a cpp file. Is there any better, cleaner way?

extern "C" int errno;

extern "C" {
  #include "error.h"
}

Or, probably, if the header is recent, just:
  #include "error.h"

Better, cleaner - you decide.

-jcw