Re: function to check if a symbol in a library exists or not

  • From: Oliver Schneider <luajit-mailinglist@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 31 Jul 2012 12:29:24 +0000

On 2012-07-31 10:27, Fjölnir Ásgeirsson wrote:
> Well no. It pcalls, and catches the error. That can't possibly be as fast as 
> just calling dlsym straight. (which is how you check for symbols at runtime 
> => I'm not sure what the issue is)
> Is dlsym not available on windows?
It isn't, but you could easily write a wrapper around GetProcAddress()
providing the functionality. Even the prototype of dlsym() and
GetProcAddress() are virtually identical.

http://linux.die.net/man/3/dlsym
http://msdn.microsoft.com/en-us/library/windows/desktop/ms683212.aspx

// Oliver

Other related posts: