[liblouis-liblouisxml] Re: Building with Cygwin

  • From: "Michel such" <michel.such@xxxxxxx>
  • To: <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Fri, 16 Jan 2009 23:45:07 +0100

Jamie,

When I build Liblouis with mingw, it effectively creates a dll called 
liblouis-1.dll.
I just renamed this dll in liblouis.dll and used it with NVDA and it works fine.
I just don't know why it names it liblouis-1.
Inicidentally, the size of the produiced dll is much bigger than the one we 
originally had in NVDA.
Simply apply strip against it, to get it to n eqivalent size.

  ----- Original Message ----- 
  From: James Teh 
  To: liblouis/liblouisxml mailing list 
  Sent: Friday, January 16, 2009 11:21 PM
  Subject: [liblouis-liblouisxml] Building with Cygwin


  Hi all,

  Allow me to provide some clarifications regarding building with Cygwin.

  As you probably already know, Cygwin provides an emulation layer using 
  cygwin1.dll and other such dlls for Unix specific system calls and other 
  functions. When you build with no special options under Cygwin, the 
  resulting executables and dlls require the Cygwin emulation layer. While 
  this is useable, it is not ideal for distribution as a native Windows build.

  For code that doesn't require Unix specific functions, Cygwin can also 
  build using mingw, which produces native Windows code that does not 
  depend on Cygwin.

  Because you need to pass some arguments to gcc, this is not as simple as 
  it could be. You need to create the following script and place it in the 
  Cygwin PATH (I use /usr/local/bin):
  --begin--
  #!/bin/bash
  gcc -mno-cygwin "$@"
  --end--
  (Of course, you only need to do this bit once.)

  Now, change to the liblouis source dir and run configure like this:
  ./configure CC=mgcc --build=mingw32
  (Apparently, CC="gcc -mno-cygwin", which would be a lot simpler, causes 
  problems because one of the tools strips the command line argument.)

  Running:
  make
  will now build liblouis.
  make install will install it to Cygwin's /usr/local. However, you could do:
  make install DESTDIR=/path/to/desired/dest/dir
  to make it install all relevant files to a specific location.

  One problem is that I'm not sure how to stop it from calling the dll 
  "liblouis-1.dll". I would prefer "liblouis.dll" under Windows. Michel, 
  does mingw do this or is this a Cygwin/mingw issue?

  Regarding liblouisxml, I suspect this will be somewhat trickier. This is 
  because Cygwin provides its own version of libxml2, but this doubtless 
  depends on Cygwin, which is undesirable. You would have to build using a 
  mingw version of libxml2, but I'm not sure how to do that under Cygwin.

  It's probably simpler to just use mingw and msys, as you don't have to 
  worry about the Cygwin dependency at all. However, I thought I'd provide 
  these instructions for those that care. :)

  -- 
  James Teh
  Email/MSN Messenger/Jabber: jamie@xxxxxxxxxxx
  Web site: http://www.jantrid.net/
  For a description of the software and to download it go to
  http://www.jjb-software.com

Other related posts: