Skip to content

Link error in dirobj.obj when static linking is used #440

@Aderiani

Description

@Aderiani

I am trying to use stepcode using static library linking, but if face two LNK2019 errors about unresolved external symbols in dirobj.obj in steputils-static.lib. One symbol is PathCanonicalizeA and the other one is PathIsDirectoryA.
When I change to dynamic libraries the problem is solved and it runs without any problem.
I am using VS2022 with C++17, on Windows 10. Any idea of what could be the problem?

Error LNK2019 unresolved external symbol __imp_PathCanonicalizeA referenced in function "public: static class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl DirObj::Normalize(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?Normalize@DirObj@@sa?AV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@AEBV23@@z)

Error LNK2019 unresolved external symbol __imp_PathIsDirectoryA referenced in function "public: static bool __cdecl DirObj::IsADirectory(char const *)" (?IsADirectory@DirObj@@SA_NPEBD@Z)

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