Perhaps the CFLAGS parameter on the configure command line can be set to provide the right calling conventions. John On Thu, Feb 05, 2009 at 04:17:35PM -0800, Yuemei Sun wrote: > Unfortunately, when calling DLL from Visual Basic, there are some > requirments, one of which is the WINAPI calling convention. So I will > still need to compile a DLL myself or write another wrapper DLL that > will export the functions that meet the requirements. > > Yuemei > > John J. Boyer wrote: > > >I think the calling conventions are different if a program is compiled > >under gcc, as the Windows binary was, since Michel used mingw, and if it > >is compiled with a Microsoft compiler. They are almost certainly C > >conventions. > > > >John > > > >On Thu, Feb 05, 2009 at 12:29:22PM -0800, Yuemei Sun wrote: > > > > > >>Hi, Michel, > >> > >>Thank you for your effort of building a Windows binary. We have been > >>compiling the Windows binary (DLL) by ourselves and have to do so > >>whenever we want to include a new release into our braille translation > >>program (a VB6 Office plug in project). > >> > >>I just tried calling "lou_version" and "lou_translateString()" that are > >>exported from liblouis.dll from our VB6 project, and "lou_version()" > >>works fine. However, with "lou_translateString()", I got "Bad Calling > >>Convention Error". Which calling convention do you use for the exported > >>functions, C calling convection (__cdecl) or the WINAPI (__stdcall)? > >>Our program expects a WINAPI calling convention. BTW, I double checked > >>the parameter list of lou_translateSttring() in the doucmentation coming > >>with your ZIP file; it is the same as in liblouis 1.3.9 (the version we > >>use in our current braille translation program), so there is nothing > >>wrong with the number or the type of of parameters passed from our > >>program into the DLL. > >> > >>Thanks, > >> > >>Yuemei > >> > >>Michel such wrote: > >> > >> > >> > >>>John, > >>> > >>>At this point, I can propose a simple zip file with all the binaries. > >>>You only have to unzip it and can run the programs from its bin > >>>subdirectory. > >>>This can be done at once. > >>>In the future, I would like to add some bells and whistles like an > >>>installer and some gui environment. > >>> > >>>But for now, you can download the zip file at: > >>>http://www.nvda.fr/dl/liblouisxml-1.8.0-win32.zip > >>> > >>>Unzipping it will create a louis directory that you can place anywhere. > >>>The archive also contains antiword for convenience. > >>> > >>>----- Original Message ----- > >>>From: John J. Boyer > >>>To: liblouis-liblouisxml@xxxxxxxxxxxxx > >>>Sent: Thursday, February 05, 2009 6:31 PM > >>>Subject: [liblouis-liblouisxml] Re: Question aout liblouisxml structure > >>> > >>> > >>>Michel, > >>> > >>>This is something I've been wanting for a long time. I assume that the > >>>binary is a zip file. It should need only a few simple installation > >>>instructions. Can you put the zip file and the instructions on a website > >>>and post a link to the list? > >>> > >>>I know you had a hard time reaching this goal, and I'm rather concerned > >>>that your setup with mingw, etc. might be hard to duplicate. > >>> > >>>Thanks, > >>>John > >>> > >>>On Thu, Feb 05, 2009 at 06:04:26PM +0100, Michel such wrote: > >>> > >>> > >>>>John, > >>>> > >>>>Just tested it on my wife's machine which is free of any development > >>>> > >>>> > >>>environment (no mingw or cygwin) > >>> > >>> > >>>>and it works fine. > >>>> > >>>>I'll let you know how to build it (at least under mingw). > >>>> > >>>>It is straight forward for liblouis and libxml2. > >>>>For liblouisxml, you need to install pkg-config which I spent spme time > >>>> > >>>> > >>>to setup correctly. > >>> > >>> > >>>> ----- Original Message ----- > >>>> From: John J. Boyer > >>>> To: liblouis-liblouisxml@xxxxxxxxxxxxx > >>>> Sent: Thursday, February 05, 2009 5:30 PM > >>>> Subject: [liblouis-liblouisxml] Re: Question aout liblouisxml > >>>> > >>>> > >>>structure > >>> > >>> > >>>> Michel, > >>>> > >>>> This is great. I think your paths.c can be combined with the original > >>>> one to handle all situations. Can you make the binary and then test > >>>> > >>>> > >>>it > on machines that don't have either Mingw or Cygwin? If it works > >>>under > those circumstances we can figure out the best way to > >>>distribute it. > Please also give me a description of how you made it. > >>> > >>> > >>>> Thanks, > >>>> John > >>>> > >>>> On Thu, Feb 05, 2009 at 05:09:55PM +0100, Michel such wrote: > >>>> > Hi John, > >>>> > > >>>> > Oops, I understand the problem. > >>>> > > >>>> > So this new one seems to work fine, at least it finds all needed > >>>> > >>>> > >>>files on my machine (liblouis tables and lbx files). > >>> > >>> > >>>> > So, here it is attached. > >>>> > > >>>> > ----- Original Message ----- > >>>> > From: John J. Boyer > >>>> > To: liblouis-liblouisxml@xxxxxxxxxxxxx > >>>> > Sent: Thursday, February 05, 2009 1:46 PM > >>>> > Subject: [liblouis-liblouisxml] Re: Question aout liblouisxml > >>>> > >>>> > >>>structure > >>> > >>> > >>>> > > >>>> > > >>>> > michel, > >>>> > > >>>> > This is a good start. It will work for now in getting the Windows > >>>> > version mp and running, but as you probably realize it can't > >>>> > >>>> > >>>replace the > > paths.c in the distribution. I do see a problem at > >>>line 152. You have to > > add paths for both > >>>\usr\share|liblouisxml\lbx_files and > > \usr\share\liblouis\tables > >>>. I'm really happy that we are so close. > >>> > >>> > >>>> > > >>>> > John > >>>> > > >>>> > On Wed, Feb 04, 2009 at 06:33:28PM +0100, Michel such wrote: > >>>> > > Hi John, > >>>> > > > >>>> > > Here is a modified paths.c > >>>> > > > >>>> > > The _win32 code has been changed so that it returns the current > >>>> > >>>> > >>>path of the module instead of "c:\Program Files". > >>> > >>> > >>>> > > > >>>> > > So, if you run for example xlm2brl.exe from directory > >>>> > >>>> > >>>d:\louis\bin, > >>> > >>> > >>>> > > it will return > >>>> > > d:\louis\bin\ > >>>> > > > >>>> > > then you can concatenate the appropriate subdir. > >>>> > > > >>>> > > the conde has been borrowed from BRLTTY (essentially from file > >>>> > >>>> > >>>sys_prog_windows.h) > >>> > >>> > >>>> > > and adapted by me to fit my needs. > >>>> > > > >>>> > > As I am not a great c expert, it probably might be improved. > >>>> > > > >>>> > > So here it is attached. > >>>> > > ----- Original Message ----- > >>>> > > From: John J. Boyer > >>>> > > To: liblouis-liblouisxml@xxxxxxxxxxxxx > >>>> > > Sent: Monday, February 02, 2009 9:00 PM > >>>> > > Subject: [liblouis-liblouisxml] Re: Question aout liblouisxml > >>>> > >>>> > >>>structure > >>> > >>> > >>>> > > > >>>> > > > >>>> > > Michel, > >>>> > > > >>>> > > When liblouis and liblouisxml are built under Linux you can > >>>> > >>>> > >>>specify the > > > directory in which they will be placed with the > >>>--prefix option in > > > configure. I think > >>> > >>> > >>>> > > that it would be good if we didn't try to put them in > >>>> > >>>> > >>>"program Files". > > > Neither Cygwin nor Mingw installs under > >>>that directory. Suppose, > > > however, we install them in > >>>c:\louss using configure --prefix=c:\louis . > > > Then > >>>xml2brl.exe, lou_allround.exe, etc. will be in c:\louis\bin . The > > > >>>> DLLs will be in c|\louis\lib and the liblouis tables will be in > > >>>> > c:\louis\usr\share\liblouis\tables . The liblouisxml > >>>semantic-action > > >>> > >>>> > files and configuration files will be in > > > > >>>> > >>>> > >>>c:\louis\usr\share\liblouisxml\lbx_files. The programs will thus be able > >>> > >>> > >>>> > > to find what they need and we can make the Windows binary by > >>>> > >>>> > >>>zipping the > > > c:\louis directory recursively. > >>> > >>> > >>>> > > > >>>> > > At least that is how I hope it would work. I'll have to try > >>>> > >>>> > >>>to duplicate > >>> > >>> > >>>> > > your setup with Mingw and Msys. I have the zip file you put > >>>> > >>>> > >>>up a couple > >>> > >>> > >>>> > > of weeks ago, but I think you have added some other packages. > >>>> > >>>> > >>>Could you > >>> > >>> > >>>> > > provide a new file with these other packages? I'll have tr > >>>> > >>>> > >>>discover how > >>> > >>> > >>>> > > the compiler can know that it is in Mingw as well as Windows. > >>>> > >>>> > >>>Then I can > >>> > >>> > >>>> > > modify paths.c accordingly. > >>>> > > > >>>> > > You are making a real contribution. I think we are close to > >>>> > >>>> > >>>having those > >>> > >>> > >>>> > > Windows binaries. > >>>> > > > >>>> > > Thanks, > >>>> > > John > >>>> > > > >>>> > > On Mon, Feb 02, 2009 at 07:15:36PM +0100, Michel such wrote: > >>>> > > > John, > >>>> > > > > >>>> > > > It appears that, when compiling with mingw, it is > >>>> > >>>> > >>>recognized as being in _win32 environment. > >>> > >>> > >>>> > > > So it compiles the lines corresponding to this in paths.c. > >>>> > > > It assumes that the directory containing the conversion > >>>> > >>>> > >>>tables and the .cfg files should be somewhere under "c:\Program Files". > >>> > >>> > >>>> > > > It would be better, in my opinion, if it would be "Program > >>>> > >>>> > >>>" independant. > >>> > >>> > >>>> > > > The better would be to retrieve the directory where the > >>>> > >>>> > >>>program runs from. > >>> > >>> > >>>> > > > for example if I run the program from: > >>>> > > > c:\liblouisxml\bin\xml2brl.exe > >>>> > > > it should return > >>>> > > > c:\liblouisxml\bin as currentPath. > >>>> > > > Then, in yourSubDir, we could put something like > >>>> > > > ".\\etc\\tables" > >>>> > > > So, if you install liblouisxml in > >>>> > > > c:\Program Files\liblouisxml > >>>> > > > the path you would retrieve in the end would be: > >>>> > > > c:\Program Files\liblouisxml\bin..\etc\tables > >>>> > > > wich is like > >>>> > > > c:\Program Files\liblouisxml\etc\tables > >>>> > > > > >>>> > > > ----- Original Message ----- > >>>> > > > From: John J. Boyer > >>>> > > > To: liblouis-liblouisxml@xxxxxxxxxxxxx > >>>> > > > Sent: Saturday, January 31, 2009 4:27 PM > >>>> > > > Subject: [liblouis-liblouisxml] Re: Question aout > >>>> > >>>> > >>>liblouisxml structure > >>> > >>> > >>>> > > > > >>>> > > > > >>>> > > > Michel, > >>>> > > > > >>>> > > > i assume you are using Mingw and Msys. The mysubdir line > >>>> > >>>> > >>>was intended > > > > for building liblouisxml with a Microsoft > >>>compiler such as VC6. On line > > > > 38 of paths.c there is > >>>the statement: > >>> > >>> > >>>> > > > #ifdef _WIN32 > >>>> > > > Which checks whether you are compiling under Windows. It > >>>> > >>>> > >>>should also be > > > > possible to check whether you are using > >>>Mingw. I'm not sure just what > > > > this variable is called. > >>>But if you are compiling under Mingw you want > > > > to skip > >>>all the code up to line 118, where there is a comment about Unix > > > >>>> > >>> > >>>> paths. This can be done by modifying the #ifdef statement at line 38. > >>>> > > > Let's hope someone more familiar with Mingw knows how to > >>>> > >>>> > >>>do this. > >>> > >>> > >>>> > > > > >>>> > > > Once this is done, we will have to decide on a suitable > >>>> > >>>> > >>>value for the > > > > --prefix option in configure for both > >>>liblouis and liblouisxml. > > > > > >>> > >>> > >>>> > > > John > >>>> > > > > >>>> > > > > >>>> > > > On Sat, Jan 31, 2009 at 02:55:54PM +0100, Michel such > >>>> > >>>> > >>>wrote: > >>> > >>> > >>>> > > > > Hi all, > >>>> > > > > > >>>> > > > > After 2 weeks of hard fight, I finally succeeded > >>>> > >>>> > >>>building liblouisxml under Windows. > >>> > >>> > >>>> > > > > > >>>> > > > > Now a question: > >>>> > > > > > >>>> > > > > I have changed the file paths.c (line 114). > >>>> > > > > I replaced yoursubdir by a directory name of mine (I > >>>> > >>>> > >>>called it "tables"). > >>> > >>> > >>>> > > > > As I understand, this directory should contain > >>>> > >>>> > >>>conversion tables and maybe cfg files. > >>> > >>> > >>>> > > > > > >>>> > > > > Where should this directory be located in the > >>>> > >>>> > >>>liblouisxml directory structure? > >>> > >>> > >>>> > > > > I currently have a standard structire (bin, etc, > >>>> > >>>> > >>>include...) > >>> > >>> > >>>> > > > -- > >>>> > > > My websites: > >>>> > > > http://www.godtouches.org > >>>> > > > http://www.jjb-software.com > >>>> > > > Location: Madison, WI, USA > >>>> > > > > >>>> > > > For a description of the software and to download it go to > >>>> > > > http://www.jjb-software.com > >>>> > > > >>>> > > -- > >>>> > > My websites: > >>>> > > http://www.godtouches.org > >>>> > > http://www.jjb-software.com > >>>> > > Location: Madison, WI, USA > >>>> > > > >>>> > > For a description of the software and to download it go to > >>>> > > http://www.jjb-software.com > >>>> > > >>>> > > >>>> > > >>>> > -- > >>>> > My websites: > >>>> > http://www.godtouches.org > >>>> > http://www.jjb-software.com > >>>> > Location: Madison, WI, USA > >>>> > > >>>> > For a description of the software and to download it go to > >>>> > http://www.jjb-software.com > >>>> > >>>> > >>>> > >>>> -- > >>>> John J. Boyer, Executive Director > >>>> GodTouches Digital Ministry, Inc. > >>>> http://www.godtouches.org > >>>> Madison, Wisconsin, USA > >>>> Peace, Love, Service > >>>> > >>>> For a description of the software and to download it go to > >>>> http://www.jjb-software.com > >>>> > >>>> > >>>-- > >>>My websites: > >>>http://www.godtouches.org > >>>http://www.jjb-software.com > >>>Location: Madison, WI, USA > >>> > >>>For a description of the software and to download it go to > >>>http://www.jjb-software.com > >>> > >>> > >>> > >>> > >>> > >>For a description of the software and to download it go to > >>http://www.jjb-software.com > >> > >> > > > > > > > > For a description of the software and to download it go to > http://www.jjb-software.com -- My websites: http://www.godtouches.org http://www.jjb-software.com Location: Madison, WI, USA For a description of the software and to download it go to http://www.jjb-software.com