[liblouis-liblouisxml] win32 liblouis
- From: "Dinesh Kaushal" <dineshkaushal@xxxxxxxxxxx>
- To: <liblouis-liblouisxml@xxxxxxxxxxxxx>
- Date: Tue, 24 Nov 2009 18:31:52 +0530
Hi all,
I have been using liblouis for last 4 years, but after a year's interval I
updated 5 files from 1.7.0, and liblouis is not compiling for windows
mobile.
I have downloaded the file: liblouis-1.7.0.tar.gz
Files are: compileTranslationTable.c, liblouis.h, lou_backTranslateString.c,
lou_translateString.c, and louis.h.
I get 102 errors during compilation which are similar to:
1>C:\Program Files\Windows Mobile 6
SDK\Smartphone\include\ARMV4I\prsht.h(70) : error C2143: syntax error :
missing '{' before '*'
After searching on google I found a Microsoft knowledge base article saying
that I should include windows.h
So I changed the following code in liblouis.h on line 47
#ifdef _WIN32
#define EXPORT_CALL __stdcall
char * EXPORT_CALL lou_getProgramPath (void);
#else
to
#ifdef _WIN32
#define EXPORT_CALL __stdcall
char * EXPORT_CALL lou_getProgramPath (void);
#include <windows.h>
#else
The above step reduces the errors to 3:
1>..\compileTranslationTable.c(53) : warning C4013: 'strerror' undefined;
assuming extern returning int
1>..\compileTranslationTable.c(53) : error C2065: 'errno' : undeclared
identifier
1>..\compileTranslationTable.c(3955) : error C2065: 'PACKAGE_VERSION' :
undeclared identifier
1>..\compileTranslationTable.c(3955) : error C2099: initializer is not a
constant
If I comment out, then compile errors are solved, but I get link errors
when I link liblouis with my code
1>liblouisce.lib(compileTranslationTable.obj) : error LNK2019: unresolved
external symbol strdup referenced in function strdupWrapper
1>liblouisce.lib(compileTranslationTable.obj) : error LNK2019: unresolved
external symbol getenv referenced in function lou_getTable
It seems windows compatibility is broken in liblouis or I am doing something
wrong.
Regards
Dinesh
"An excellent plumber is infinitely more admirable than an incompetent
philosopher. The society which scorns excellence in plumbing because
plumbing is a humble activity and tolerates shoddiness in philosophy because
it is an exalted activity will have neither good plumbing nor good
philosophy. Neither its pipes nor its theories will hold water."
John Gardner
Other related posts: