[liblouis-liblouisxml] Problems found building with integration/msvc branch

  • From: Neil Soiffer <soiffer@xxxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Sun, 4 Jun 2017 07:02:32 -0700

With a checkout on 4/27, here are some problems/fixes I found to the
integration/msvc branch. I'm not sure if they affect the main branch also.

Two fixes to compileTranslationTable.c:
Two type mismatches

static char ** (* tableResolver) (const char *tableList, const char *base) =
  &_lou_defaultTableResolver;
==>
static char ** (EXPORT_CALL* tableResolver) (const char *tableList, const
char *base) =
  &_lou_defaultTableResolver;



lou_registerTableResolver (char ** (* resolver) (const char *tableList,
const char *base))
==>
lou_registerTableResolver (char ** (EXPORT_CALL* resolver) (const char
*tableList, const char *base))


..\liblouis\findTable.c(426): warning C4018: '<': signed/unsigned mismatch
==>
Use size_t instead of int for index variable:
  size_t k;

In liblouisutdml\readconfig.c, change getLastTableList to
_lou_getLastTableList


I have a VS project file and filter file. Any interest in them?

Apparently, the main include file changed from louis.h to liblouis.h. This
means that in the liblousUTDML project, it needs to change in
liblouisutdml/louisutdml.h
liblouisutdml\readconfig.c (actually, it can be deleted here because
louisutdml.h in included)

Also, it looks like alot of things were moved to internal.h (see a few
below). They probably shouldn't have that means internal.h needs to be
included in louisutdml.h (which seems wrong).
ENDSEGMENT
TranslationTableHeader
...


make_makefile.c needs to specify /D_EXPORTING on the CCFLAGS line. If you
don't, it defines
#define LIBLOUIS_API __declspec(dllimport)

This is right if it links against the DLL, but it links against the library
(.lib). So it is wrong and generates LNK2001 and LNK2019 (using dllimport
generates names like __imp__XXX which are used at load time to resolve to
the XXX function, but libraries are statically linked).

Other related posts: