With GSoC coming around again, and students expressing interest in
trying to get the Java runtime to work as an embedded library, I
figured it was time to get my Apertium dev environment back up and
running on my Windows box (had to completely re-install last summer).
When trying to re-build the Apertium C++ runtime, I ran into an
interesting issue with trying to compile Apertium.

I got the following two messages when trying to compile Apertium:

../apertium/constant_manager.h:42:14: error: 'FILE' has not been declared
../apertium/constant_manager.h:43:13: error: 'FILE' has not been declared

And then that was followed up by a bunch of related messages:

constant_manager.cc:72:1: error: prototype for 'void
ConstantManager::write(FILE*)' does not match any in class
'ConstantManager'
../apertium/constant_manager.h:42:8: error: candidate is: void
ConstantManager::write(int*)
constant_manager.cc:85:1: error: prototype for 'void
ConstantManager::read(FILE*)' does not match any in class
'ConstantManager'
../apertium/constant_manager.h:43:8: error: candidate is: void
ConstantManager::read(int*)
Makefile:941: recipe for target `constant_manager.lo' failed
make[2]: *** [constant_manager.lo] Error 1

And then the make would fail. After poking around for a bit, I found
out that constant_manager.cc included <lttoolbox/compression.h>, which
in turn included <cstdio>. However, constant_manager.h did not include
<cstdio>. Adding an include for <cstdio> to constant_manager.h fixed
the issue, and it was able to compile. I don't remember having an
issue like that before, but apparently the g++ I'm using in cygwin
isn't accepting the reference to FILE in constant_manager.h w/o the
explicit <cstdio> include.  Would that break it for others to add that
include? (I don't anticipate so, but wanted to make sure.)

-- Stephen

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to