Skip to content

LNK2005 error of boost::archive::codecvt_null<wchar_t> #252

Closed
@AdmiralPellaeon

Description

@AdmiralPellaeon

Hi,

after switiching a x64 project from boost 1_73_0 to 1_78_0 and from VS 2019 to VS 2022, I get the linker error LNK2005: LNK2005 "public: __cdecl boost::archive::codecvt_null<wchar_t>::codecvt_null<wchar_t>(unsigned __int64)"(??0?$codecvt_null@_W@archive@boost@@qeaa@_K@Z) ist bereits in ARViewer_Tools.lib(ARViewer_Tools.dll) definiert. Scenario C:\Projekte\ARViewerNG\Source\Scenario\libboost_serialization-vc143-mt-x64-1_78.lib(codecvt_null.obj)

The project consists of several parts. Regarding the problem I have a DLL project which uses boost::serialization. The project exports classes with the dllexport mechanism of the VS compiler. And this DLL is then used in another project, where boost::serialization is also used and linked. Import symbols are defined by the lib file from the DLL project, which is provided by the compiler.

With boost 1_73_0 there was no problem at all. Now, I get the linker error. Does bs::serialization export symbols automatically when used in a VS DLL project? Or what could be the reason for this behavior and how can I fix this?

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions