<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-12-29 12:32 GMT+01:00 Stefan Löffler <span dir="ltr"><<a href="mailto:st.loeffler@gmail.com" target="_blank">st.loeffler@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5"></div></div>
    Interesting. Can you tell me which makefile and compiler/linker
    options you use? I cross-compile from Linux, so that may account for
    some size increase, but hopefully this can be improved.<br></div></blockquote><div><br></div><div>Yes. I used a windows XP in virtualbox.<br><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt" id="docs-internal-guid-a7550eeb-9648-0542-22bb-69d5b58f5141"><font><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">I installed mingw 32 bits with msys, gcc...</span></font></p><p style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">To compile lua 5.2 :<br></span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">I copy sources of lua 5.2 in c:\mingw\lua 5.2</span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">I open a dos command window with cmd.exe and I go to </span><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">c:\mingw\lua 5.2</span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">I write :</span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><span style="font-family:monospace,monospace"><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">SET PATH=%PATH%;c:\mingw\msys\1.0\bin</span><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><br class=""></span><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">make clean</span><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><br class=""></span><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">make mingw</span></span><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"></span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><br><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"></span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">And I get </span><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">exe and dll files in lua-5.2.0\src (lua52.dll is only 184KB)<br></span></font></p><p style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">To compile lpeg :<br></span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">I copy source in lua-5.2.0\lpeg-0.12.1 and, in my dos command, I go to this directory with :</span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><span style="font-family:monospace,monospace"><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">cd lpeg-0.12.1</span></span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">I compile without make : </span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font><span style="font-family:monospace,monospace"><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">gcc -O2 -shared -s -I c:\mingw\lua-5.2.0\src -L c:\mingw\lua-5.2.0\src -o lpeg.dll lptree.c lpvm.c lpcap.c lpcode.c lpprint.c -llua52</span></span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><br></p><p style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">And I get lpeg.dll in this directory.<br></p></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
    Also, if you send me the dll, I can put it up on Google Drive.
    Still, for the future, it would be good to know if/how I can produce
    smaller libraries myself.<br></div></blockquote><div><br></div><div>Here it is with lua52.dll. Probably compiling the whole texworks on mingw windows would produce a smaller exe...<br></div><div><br></div></div></div></div>