Tuesday, October 28, 2008

Compiling libkml on Windows

Just a quick hint here for anyone searching for information on compiling libkml under Visual Studio. Version 0.4, which I just downloaded, won't compile the libkmlbase project unless you make a small modification to time_util.cc. Just change the order of the includes so that the winsock2.h include comes before the windows.h include. If you don't, you will get compiler errors such as, "error C2011: 'fd_set' : 'struct' type redefinition."

[[ UPDATE: Apparently there are other problems with using libkml in Windows. I just came across a linker issue where the symbol IsIconParent was undefined. To solve this problem, I had to add get_link_parents.cc and get_link_parents.h to the libkmlengine project and recompile. ]]

[[ UPDATE 5 Nov. 08: Both of these issues have been corrected as of version 0.5. ]]

No comments: