Closed remoe closed 1 year ago
Thanks Remo! All are fixed.
I've tried it with the following CMake config:
-DROCKY_SUPPORTS_MBTILES=OFF
-DROCKY_SUPPORTS_GDAL=OFF
Compile errors:
In file included from /src/rocky/src/rocky/TerrainTileModelFactory.cpp:7:
In file included from /src/rocky/src/rocky/Map.h:15:
/src/rocky/src/rocky/LayerCollection.h:88:35: error: member access into incomplete type 'rocky::Map'
std::shared_lock lock(_map->_mapDataMutex);
^
In file included from /src/rocky/src/rocky/TerrainTileModelFactory.cpp:6:
In file included from /src/rocky/src/rocky/TerrainTileModelFactory.h:8:
/src/rocky/src/rocky/TerrainTileModel.h:20:11: note: forward declaration of 'rocky::Map'
class Map;
^
In file included from /src/rocky/src/rocky/TerrainTileModelFactory.cpp:7:
In file included from /src/rocky/src/rocky/Map.h:15:
/src/rocky/src/rocky/LayerCollection.h:98:35: error: member access into incomplete type 'rocky::Map'
std::shared_lock lock(_map->_mapDataMutex);
^
In file included from /src/rocky/src/rocky/TerrainTileModelFactory.cpp:6:
In file included from /src/rocky/src/rocky/TerrainTileModelFactory.h:8:
/src/rocky/src/rocky/TerrainTileModel.h:20:11: note: forward declaration of 'rocky::Map'
class Map;
^
In file included from /src/rocky/src/rocky/TerrainTileModelFactory.cpp:7:
In file included from /src/rocky/src/rocky/Map.h:15:
/src/rocky/src/rocky/LayerCollection.h:108:35: error: member access into incomplete type 'rocky::Map'
std::shared_lock lock(_map->_mapDataMutex);
^
In file included from /src/rocky/src/rocky/TerrainTileModelFactory.cpp:6:
In file included from /src/rocky/src/rocky/TerrainTileModelFactory.h:8:
/src/rocky/src/rocky/TerrainTileModel.h:20:11: note: forward declaration of 'rocky::Map'
class Map;
^
3 errors generated.
The code has compile issues in LayerCollection.h. The forward declare of Map:
https://github.com/pelicanmapping/rocky/blob/main/src/rocky/LayerCollection.h#L13
can't work with the following template implementation:
https://github.com/pelicanmapping/rocky/blob/main/src/rocky/LayerCollection.h#L88
And it doesn't compile with #include <rocky/Map.h>
.
rocky/src/rocky/TMS.cpp:758:25: error: no matching function for call to object of type 'const rocky::ReadImageStreamService' (aka 'const function<Result<shared_ptr<rocky::Image>> (basic_istream<char> &, basic_string<char, char_traits<char>, allocator<char>>, const rocky::IOOptions &)>')
auto image_rr = io.services().readImageFromStream(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from rocky/src/rocky/TMS.cpp:6:
In file included from rocky/src/rocky/TMS.h:8:
In file included from rocky/src/rocky/URI.h:8:
In file included from rocky/src/rocky/Common.h:34:
/usr/include/c++/v1/__functional/function.h:1059:9: note: candidate function not viable: expects an lvalue for 1st argument
_Rp operator()(_ArgTypes...) const;
^
1 error generated.
rocky/src/rocky/URI.cpp:21:22: error: use of undeclared identifier 'OPENSSL_VERSION_STR'
ROCKY_ABOUT(openssl, OPENSSL_VERSION_STR)
The job
and job_scheduler
class must be separated, because of circular dependencies? Or should at least the job::dispatch
implementation be moved to Threading.cpp
?
Remo, I feel like many of these issues are just templates being instantiated before they are used. Is there some king of clang option for this? Because it isn't a problem on MSVC. Don't know about GCC.
I made another push to (hopefully) address these latest ones.
I haven't found a clang option to configure template instancing. Currently, I'm able to compile the project with my additional PR. But it need more work to link and run it.
1
Error: "Incomplete type 'rocky::util::job_scheduler' named in nested name specifier" at job_scheduler::Delegate delegate = [task, promise]() mutable ...
https://github.com/pelicanmapping/rocky/blob/main/src/rocky/Threading.h#L488because
https://github.com/pelicanmapping/rocky/blob/main/src/rocky/Threading.h#L572
"using Delegate" is not forward declared and can't be forward declared:
https://github.com/pelicanmapping/rocky/blob/main/src/rocky/Threading.h#L397
2
Error: Use of undeclared identifier 'options'
3
rocky/srs.h
static const SRS WGS84;
Error: duplicated member WGS84
need to delete:
SRS& SRS::operator=(SRS&&);
Error: extra qualification on member 'operator='
need to change:
`SRS& operator=(SRS&&);``
4
rocky/Heightfield.h
5
rocky/Image.h
6
rocky/IOTypes.h
For this I can't do a PR. I will try to compile it further after the issues are fixed ...