Skip to content

cereal compilation failure VS2019 with clang #652

Closed
@benui-dev

Description

Compiles fine using msvc, doesn't with clang. Any ideas?

Severity	Code	Description	Project	File	Line	Suppression State
Error		'cereal::detail::StaticObject<cereal::detail::bind_to_archives<TestEntity, cereal::detail::(anonymous namespace)::polymorphic_binding_tag> >' must have external linkage when declared 'dllexport'	C:\Ben\Blah\out\build\x64-Clang-Debug\Floe	C:\Ben\Blah\lib\cereal\include\cereal\details\static_object.hpp	67	
#include "cereal/types/polymorphic.hpp"
class TestEntity : public Entity
{
...
	template<class Archive>
	void save( Archive& archive ) const
	{
...
	}
	template<class Archive>
	void load( Archive& archive )
	{
...
	}
};

CEREAL_REGISTER_TYPE( TestEntity )
CEREAL_REGISTER_POLYMORPHIC_RELATION( Entity, TestEntity )

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions