C code:

#define GET_PROC(procName) p##procName = (procName##Fn)dlsym(libHandle, 
#procName);

// call it GET_PROC(msInit)

#translate in nim:

template GET_PROC(procName: untyped) : untyped =
    p procName = cast[procName Fn]dlsym(libHandle, ???)

I don't know to translate #procName with nim??? Please help me, thanks a lot! 

Reply via email to