[gdal-dev] GDAL build on windows failed for FILEGDB driver

Fengting Chen fengting.chen at oracle.com
Fri Mar 1 11:31:39 PST 2024


Hi,

I am using VS2015 terminal and cmake to build GDAL on windows. I got the following compilation error for filegdbindex_write.cpp. Any idea?

  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1388): note: while trying to match the argument list '(OpenFileGDB::FileGDBTable::CreateAttributeIndex::<lambda_270e841f7399ccc74e1100890f395fab>)'
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1388): error C2088: '+': illegal for class [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1384): error C2789: 'writeValueFunc': an object of const-qualified type must be initialized [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1384): note: see declaration of 'writeValueFunc'
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1390): error C3536: 'writeValueFunc': cannot be used before it is initialized [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1390): error C2664: 'bool OpenFileGDB::WriteIndex<ValueOIDPair>(VSILFILE *,std::vector<ValueOIDPair,std::allocator<_Ty>> &,void (__cdecl *)(std::vector<GByte,std::allocator<unsigned char>> &,const int &,int),int &,int)': cannot convert argument 3 from 'int' to 'void (__cdecl *)(std::vector<GByte,std::allocator<_Ty>> &,const int &,int)' [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
          with
          [
              _Ty=ValueOIDPair
          ]
          and
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1390): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1412): error C2593: 'operator +' is ambiguous [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1412): note: could be 'built-in C++ operator+(void (__cdecl *)(std::vector<GByte,std::allocator<_Ty>> &,const float &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1412): note: or       'built-in C++ operator+(void (__stdcall *)(std::vector<GByte,std::allocator<_Ty>> &,const float &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1412): note: or       'built-in C++ operator+(void (__fastcall *)(std::vector<GByte,std::allocator<_Ty>> &,const float &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1412): note: or       'built-in C++ operator+(void (__vectorcall *)(std::vector<GByte,std::allocator<_Ty>> &,const float &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1412): note: while trying to match the argument list '(OpenFileGDB::FileGDBTable::CreateAttributeIndex::<lambda_d6d798253cfbdeb6d1ec1510fd54d8e5>)'
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1412): error C2088: '+': illegal for class [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1409): error C2789: 'writeValueFunc': an object of const-qualified type must be initialized [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1409): note: see declaration of 'writeValueFunc'
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1414): error C3536: 'writeValueFunc': cannot be used before it is initialized [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1414): error C2664: 'bool OpenFileGDB::WriteIndex<ValueOIDPair>(VSILFILE *,std::vector<ValueOIDPair,std::allocator<_Ty>> &,void (__cdecl *)(std::vector<GByte,std::allocator<unsigned char>> &,const float &,int),int &,int)': cannot convert argument 3 from 'int' to 'void (__cdecl *)(std::vector<GByte,std::allocator<_Ty>> &,const float &,int)' [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
          with
          [
              _Ty=ValueOIDPair
          ]
          and
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1414): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1439): error C2593: 'operator +' is ambiguous [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1439): note: could be 'built-in C++ operator+(void (__cdecl *)(std::vector<GByte,std::allocator<_Ty>> &,const double &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1439): note: or       'built-in C++ operator+(void (__stdcall *)(std::vector<GByte,std::allocator<_Ty>> &,const double &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1439): note: or       'built-in C++ operator+(void (__fastcall *)(std::vector<GByte,std::allocator<_Ty>> &,const double &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1439): note: or       'built-in C++ operator+(void (__vectorcall *)(std::vector<GByte,std::allocator<_Ty>> &,const double &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1439): note: while trying to match the argument list '(OpenFileGDB::FileGDBTable::CreateAttributeIndex::<lambda_ef45032c1b50ce8ace9943bec4f93e5b>)'
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1439): error C2088: '+': illegal for class [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1436): error C2789: 'writeValueFunc': an object of const-qualified type must be initialized [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1436): note: see declaration of 'writeValueFunc'
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1441): error C3536: 'writeValueFunc': cannot be used before it is initialized [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1441): error C2664: 'bool OpenFileGDB::WriteIndex<ValueOIDPair>(VSILFILE *,std::vector<ValueOIDPair,std::allocator<_Ty>> &,void (__cdecl *)(std::vector<GByte,std::allocator<unsigned char>> &,const double &,int),int &,int)': cannot convert argument 3 from 'int' to 'void (__cdecl *)(std::vector<GByte,std::allocator<_Ty>> &,const double &,int)' [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
          with
          [
              _Ty=ValueOIDPair
          ]
          and
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1441): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1503): error C2593: 'operator +' is ambiguous [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1503): note: could be 'built-in C++ operator+(void (__cdecl *)(std::vector<GByte,std::allocator<_Ty>> &,const std::vector<uint16_t,std::allocator<unsigned short>> &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1503): note: or       'built-in C++ operator+(void (__stdcall *)(std::vector<GByte,std::allocator<_Ty>> &,const std::vector<uint16_t,std::allocator<unsigned short>> &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1503): note: or       'built-in C++ operator+(void (__fastcall *)(std::vector<GByte,std::allocator<_Ty>> &,const std::vector<uint16_t,std::allocator<unsigned short>> &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1503): note: or       'built-in C++ operator+(void (__vectorcall *)(std::vector<GByte,std::allocator<_Ty>> &,const std::vector<uint16_t,std::allocator<unsigned short>> &,int))'
          with
          [
              _Ty=GByte
          ]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1503): note: while trying to match the argument list '(OpenFileGDB::FileGDBTable::CreateAttributeIndex::<lambda_102f9bf4de151179fe45fb40d3de5963>)'
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1503): error C2088: '+': illegal for class [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1493): error C2789: 'writeValueFunc': an object of const-qualified type must be initialized [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
  E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1493): note: see declaration of 'writeValueFunc'
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1507): error C3536: 'writeValueFunc': cannot be used before it is initialized [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
E:\gdal-3.8.4\ogr\ogrsf_frmts\openfilegdb\filegdbindex_write.cpp(1508): error C2664: 'bool OpenFileGDB::WriteIndex<ValueOIDPair>(VSILFILE *,std::vector<ValueOIDPair,std::allocator<_Ty>> &,void (__cdecl *)(std::vector<GByte,std::allocator<unsigned char>> &,const std::vector<uint16_t,std::allocator<unsigned short>> &,int),int &,int)': cannot convert argument 3 from 'int' to 'void (__cdecl *)(std::vector<GByte,std::allocator<_Ty>> &,const std::vector<uint16_t,std::allocator<unsigned short>> &,int)' [E:\gdal-3.8.4\build\ogr\ogrsf_frmts\openfilegdb\ogr_OpenFileGDB.vcxproj]
          with
          [
              _Ty=ValueOIDPair
          ]
          and
          [
              _Ty=GByte
          ]

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240301/1fa7c6ca/attachment-0001.htm>


More information about the gdal-dev mailing list