Notifications
Clear all

[Closed] SDK: Namespace definition trouble

I’m trying to replicate some of the example files, and I’m having an issue with some of the namespace definitions. For example, the following case:

#include <Graphics/Utilities/MeshEdgeRenderItem.h>
MaxSDK::Graphics::Utilities::MeshEdgeKey LightMeshKey;

bool LightPlugin::PrepareDisplay(const MaxSDK::Graphics::UpdateDisplayContext& displayContext) {
    LightMeshKey.SetFixedSize(true);
    return true;
}

In the VS editor, everything seems to be in working order (i.e. nothing underlined, definitions show on hover state). But when I try to compile, I get the following errors:

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol “__declspec(dllimport) public: __cdecl MaxSDK::Graphics::Utilities::MeshEdgeKey::MeshEdgeKey(void)” (_imp??0MeshEdgeKey@Utilities@Graphics@MaxSDK@@QEAA@XZ) referenced in function “void __cdecl `dynamic initializer for ‘LightMeshKey’’(void)” (??__ELightMeshKey@@YAXXZ) LightPlugin C:\Users\Kevin\documents\visual studio 2015\Projects\LightPlugin\LightPlugin\LightPlugin.obj 1

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol “__declspec(dllimport) public: virtual __cdecl MaxSDK::Graphics::Utilities::MeshEdgeKey::~MeshEdgeKey(void)” (_imp??1MeshEdgeKey@Utilities@Graphics@MaxSDK@@UEAA@XZ) referenced in function “void __cdecl `dynamic atexit destructor for ‘LightMeshKey’’(void)” (??__FLightMeshKey@@YAXXZ) LightPlugin C:\Users\Kevin\documents\visual studio 2015\Projects\LightPlugin\LightPlugin\LightPlugin.obj 1

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol “__declspec(dllimport) public: virtual void __cdecl MaxSDK::Graphics::Utilities::MeshEdgeKey::SetFixedSize(bool)” (_imp?SetFixedSize@MeshEdgeKey@Utilities@Graphics@MaxSDK@@UEAAX_N@Z) referenced in function “public: virtual bool __cdecl LightPlugin::PrepareDisplay(class MaxSDK::Graphics::UpdateDisplayContext const &)” (?PrepareDisplay@LightPlugin@@UEAA_NAEBVUpdateDisplayContext@Graphics@MaxSDK@@@Z) LightPlugin C:\Users\Kevin\documents\visual studio 2015\Projects\LightPlugin\LightPlugin\LightPlugin.obj 1

Any idea what might be behind this?

1 Reply

Never mind. Just needed to add DefaultRenderItems.lib to the additional dependencies.