Re: pkgconfig file for Cygwin.

  • From: Dimiter 'malkia' Stanev <malkia@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sat, 08 Sep 2012 01:08:57 -0700

On 9/7/2012 9:50 PM, pansz wrote:
Hi there,

in Cygwin, LuaJit generates lua51.dll instead of libluajit-5.1.so <http://libluajit-5.1.so>

However, scripts which depends on pkgconfig/luajit.pc will expect libluajit-5.1.so <http://libluajit-5.1.so> or libluajit-5.1.dll, since that's what specified in luajit.pc.

It seems that we should either make Cygwin output libluajit-5.1.so <http://libluajit-5.1.so>, or change the pkgconfig/luajit.pc file in cygwin to link against lua51.dll instead of libluajit-5.1

AFAIK dynamic libraries compiled from cygwin cannot be linked by non-cygwin executables (unless compiled with -mno-cygwin, or compiled with mingw compiler), so it may be sensible to just use output name with posix convention like libluajit-5.1.so <http://libluajit-5.1.so> or libluajit-5.1.dll since this is only for cygwin?

Actually I think it should be called cygluajit-5.1.so

" The name of your library is |${module}|, prefixed with |cyg| for the DLL and |lib| for the import library. Cygwin DLLs use the |cyg| prefix to differentiate them from native-Windows MinGW DLLs, see the MinGW website <http://mingw.org/> for more details. |${old_libs}| are all your object files, bundled together in static libs or single object files and the |${dependency_libs}| are import libs you need to link against, e.g *|'-lpng -lz -L/usr/local/special -lmyspeciallib'|*. "

http://cygwin.com/cygwin-ug-net/dll.html

Other related posts: