Unresolved external symbol on static class members

后端 未结 5 1398
温柔的废话
温柔的废话 2020-11-22 02:04

Very simply put:

I have a class that consists mostly of static public members, so I can group similar functions together that still have to be called from other clas

5条回答
  •  逝去的感伤
    2020-11-22 02:56

    Since this is the first SO thread that seemed to come up for me when searching for "unresolved externals with static const members" in general, I'll leave another hint to solve one problem with unresolved externals here:

    For me, the thing that I forgot was to mark my class definition __declspec(dllexport), and when called from another class (outside that class's dll's boundaries), I of course got the my unresolved external error.
    Still, easy to forget when you're changing an internal helper class to a one accessible from elsewhere, so if you're working in a dynamically linked project, you might as well check that, too.

提交回复
热议问题