Skip to content

Commit

Permalink
Fixed linker error on Visual Studio
Browse files Browse the repository at this point in the history
The Grid template class should not be marked TILEDSHARED_EXPORT, since
this makes the Visual Studio compiler think that libtiled will provide
the symbols for the instantiatons, but it can't since the instantiations
are not in libtiled.

Actually right now the Grid template could be moved from libtiled to
Tiled, though I hoped to use it in libtiled as well since it closely
matches the way cells are stored in the TileLayer. The main difference
is the way the TileLayer::setCell function has to take into account the
"checked" flag on the cell and the special logic for keeping track of
the used tilesets.
  • Loading branch information
bjorn committed Oct 21, 2020
1 parent 61fd058 commit 0b7cfe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libtiled/grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace Tiled {
* of neighboring values.
*/
template <typename T, int CHUNK_BITS = 4>
class TILEDSHARED_EXPORT Grid
class Grid
{
public:
static const int CHUNK_SIZE = 1 << CHUNK_BITS;
Expand Down

0 comments on commit 0b7cfe3

Please sign in to comment.