Rodolfo Bonnin
unread,Apr 6, 2011, 2:32:27 PM4/6/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libkml
Hello all,
I am trying to compile gdal using CMake with MinGW 4.4, and had the
following errors:
______________________________
[...]libkml-1.2.0/src/kml/base/file_win32.cc:3
5:19: error: xstring: No such file or directory
[...]libkml-1.2.0/src/kml/base/file_win32.cc:4
3:35: error: empty character constant
______________________________
So I changed the file_win32 , obtaining the following diff:
____________________________________
--- src/kml/base/file_win32.cc Wed Jan 13 21:16:30 2010
+++ src/kml/base/file_win32.cc Wed Apr 6 10:50:27 2011
@@ -32,7 +32,6 @@
#include "kml/base/file.h"
#include <windows.h>
#include <tchar.h>
-#include <xstring>
#include <algorithm>
namespace kmlbase {
@@ -40,7 +39,7 @@
// Internal to the win32 file class. We need a conversion from string
to
// LPCWSTR.
static std::wstring Str2Wstr(const string& str) {
- std::wstring wstr(str.length(), L'');
+ std::wstring wstr(str.length(), L' ');
std::copy(str.begin(), str.end(), wstr.begin());
return wstr;
}
_________________________________________________
After that the library compiled OK.
This was a quick fix, and I have to check it for correctness, any
comments are welcome regarding a better way to fix the compilation
(Conditional code to check for MinGW before including xstring for
example)
Regards and thanks in advance.