[liblouis-liblouisxml] Compilation problem with new findTable.c in Windows (MS Visual Studio)

  • From: "Arend Arends" <arendarends@xxxxxxxx>
  • To: <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Thu, 3 Nov 2016 14:34:16 +0100

I am trying to compile LibLouis 3.0.0 in Windows with MS Visual Studio.

Initially I solved a few minor problems.
Then I found that the new component findTable.c (added by Bert Frees 2015?) was 
not added to windows\makefile.nmake.

After I changed makefile.nmake, the compiler could not find dirent.h.
It seems dirent.h is not supported normally by Visual Studio, but is included 
in the MinGW compiler. There is a version of dirent.h available via 
http://softagalleria.net/dirent.php that can be used with Visual Studio.
After I copied it, I tried to compile again, but this time the compilation of 
findTable.c gave several problems, that I list at the end of this message.

At the moment I cannot solve these compilation problems easily.
For reference, the first error appears in line 98 with the contents:
      List * l3 = malloc(sizeof(List));

Before I dive into these problems further:

Is findTable.c a necessary part of LibLouis.dll?
If not, is there an easy way to remove this part or replace it by a stub?
Has anyone tried to combine LibLouisutdml yet with version 3.0.0?
If I cannot solve these problems shortly I will have to stick with version 
2.6.5 (actually I am still using 2.6.4) for our next release of TactileView.

Best regards,

Arend Arends

Contents of Command Prompt:

C:\Users\Arend\Documents\TactileView\LibLouis\liblouis-3.0.0\windows>nmake /f 
makefile.nmake

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl.exe /nologo /O2 /W3 /c /MD /D_CRT_SECURE_NO_WARNINGS 
/D_CRT_NONSTDC_NO_DEPRECATE /Iinclude /DWIDECHAR_TYPE="unsigned short int" 
/DUNICODEBITS=16 ..\liblouis\findTable.c
findTable.c
..\liblouis\findTable.c(98) : error C2275: 'List' : illegal use of this type as 
an expression
        ..\liblouis\findTable.c(43) : see declaration of 'List'
..\liblouis\findTable.c(98) : error C2065: 'l3' : undeclared identifier
..\liblouis\findTable.c(99) : error C2223: left of '->head' must point to 
struct/union
..\liblouis\findTable.c(100) : error C2223: left of '->free' must point to 
struct/union
..\liblouis\findTable.c(101) : error C2223: left of '->tail' must point to 
struct/union
..\liblouis\findTable.c(103) : warning C4047: '=' : 'List *' differs in levels 
of indirection from 'int'
..\liblouis\findTable.c(105) : warning C4047: '=' : 'List *' differs in levels 
of indirection from 'int'
..\liblouis\findTable.c(270) : error C2143: syntax error : missing ';' before 
'type'
..\liblouis\findTable.c(271) : error C2143: syntax error : missing ';' before 
'const'
..\liblouis\findTable.c(272) : error C2143: syntax error : missing ';' before 
'const'
..\liblouis\findTable.c(275) : error C2065: 'l1' : undeclared identifier
..\liblouis\findTable.c(277) : error C2065: 'l2' : undeclared identifier
..\liblouis\findTable.c(279) : error C2065: 'quotient' : undeclared identifier
..\liblouis\findTable.c(280) : error C2223: left of '->tail' must point to 
struct/union
..\liblouis\findTable.c(285) : error C2223: left of '->tail' must point to 
struct/union
..\liblouis\findTable.c(289) : error C2223: left of '->head' must point to 
struct/union
..\liblouis\findTable.c(289) : error C2223: left of '->head' must point to 
struct/union
..\liblouis\findTable.c(289) : error C2198: 'cmpKeys' : too few arguments for 
call through pointer-to-function
..\liblouis\findTable.c(293) : error C2223: left of '->tail' must point to 
struct/union
..\liblouis\findTable.c(298) : error C2223: left of '->tail' must point to 
struct/union
..\liblouis\findTable.c(302) : error C2223: left of '->head' must point to 
struct/union
..\liblouis\findTable.c(302) : error C2223: left of '->head' must point to 
struct/union
..\liblouis\findTable.c(302) : error C2168: 'strcmp' : too few actual 
parameters for intrinsic function
..\liblouis\findTable.c(306) : error C2223: left of '->tail' must point to 
struct/union
..\liblouis\findTable.c(307) : error C2223: left of '->tail' must point to 
struct/union
..\liblouis\findTable.c(344) : warning C4554: '|' : check operator precedence 
for possible error; use parentheses to clarify precedence
..\liblouis\findTable.c(348) : warning C4013: 'strndup' undefined; assuming 
extern returning int
..\liblouis\findTable.c(348) : warning C4047: 'initializing' : 'char *' differs 
in levels of indirection from 'int'
..\liblouis\findTable.c(349) : warning C4047: ':' : 'int' differs in levels of 
indirection from 'void *'
..\liblouis\findTable.c(349) : warning C4047: 'initializing' : 'char *' differs 
in levels of indirection from 'int'
..\liblouis\findTable.c(350) : error C2440: 'initializing' : cannot convert 
from 'Feature' to 'char *'
..\liblouis\findTable.c(393) : error C2143: syntax error : missing ';' before 
'type'
..\liblouis\findTable.c(394) : error C2275: 'List' : illegal use of this type 
as an expression
        ..\liblouis\findTable.c(43) : see declaration of 'List'
..\liblouis\findTable.c(394) : error C2065: 'l' : undeclared identifier
..\liblouis\findTable.c(395) : warning C4047: '=' : 'int' differs in levels of 
indirection from 'List *'
..\liblouis\findTable.c(395) : error C2223: left of '->tail' must point to 
struct/union
..\liblouis\findTable.c(397) : error C2223: left of '->head' must point to 
struct/union
..\liblouis\findTable.c(398) : error C2065: 'k' : undeclared identifier
..\liblouis\findTable.c(415) : warning C4018: '<' : signed/unsigned mismatch
..\liblouis\findTable.c(416) : warning C4244: '=' : conversion from 'const 
widechar' to 'char', possible loss of data
..\liblouis\findTable.c(466) : warning C4244: 'function' : conversion from 
'widechar' to 'char', possible loss of data
..\liblouis\findTable.c(471) : warning C4244: 'function' : conversion from 
'widechar' to 'char', possible loss of data
..\liblouis\findTable.c(482) : warning C4244: 'function' : conversion from 
'widechar' to 'char', possible loss of data
..\liblouis\findTable.c(487) : warning C4244: 'function' : conversion from 
'widechar' to 'char', possible loss of data
..\liblouis\findTable.c(545) : error C2275: 'List' : illegal use of this type 
as an expression
        ..\liblouis\findTable.c(43) : see declaration of 'List'
..\liblouis\findTable.c(545) : error C2065: 'features' : undeclared identifier
..\liblouis\findTable.c(548) : warning C4047: 'initializing' : 'List *' differs 
in levels of indirection from 'int'
..\liblouis\findTable.c(580) : warning C4047: '=' : 'char *' differs in levels 
of indirection from 'int'
..\liblouis\findTable.c(622) : warning C4090: 'function' : different 'const' 
qualifiers
..\liblouis\findTable.c(624) : error C2275: 'List' : illegal use of this type 
as an expression
        ..\liblouis\findTable.c(43) : see declaration of 'List'
..\liblouis\findTable.c(624) : error C2065: 'queryFeatures' : undeclared 
identifier
..\liblouis\findTable.c(625) : error C2143: syntax error : missing ';' before 
'type'
..\liblouis\findTable.c(626) : error C2143: syntax error : missing ';' before 
'type'
..\liblouis\findTable.c(627) : error C2275: 'List' : illegal use of this type 
as an expression
        ..\liblouis\findTable.c(43) : see declaration of 'List'
..\liblouis\findTable.c(628) : warning C4047: '=' : 'int' differs in levels of 
indirection from 'List *'
..\liblouis\findTable.c(628) : error C2223: left of '->tail' must point to 
struct/union
..\liblouis\findTable.c(630) : error C2223: left of '->head' must point to 
struct/union
..\liblouis\findTable.c(631) : warning C4047: 'function' : 'const List *' 
differs in levels of indirection from 'int'
..\liblouis\findTable.c(632) : error C2065: 'bestQuotient' : undeclared 
identifier
..\liblouis\findTable.c(635) : error C2065: 'bestMatch' : undeclared identifier
..\liblouis\findTable.c(635) : warning C4047: '=' : 'int' differs in levels of 
indirection from 'char *'
..\liblouis\findTable.c(641) : warning C4047: 'return' : 'char *' differs in 
levels of indirection from 'int'
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
Stop.

Other related posts: