Unresolved external symbols when using newPlugin

Hallo

Thank you for the answer on another issue. I am having a problem creating a plugin object e.g. GeomStaticMesh or a BDRFmaterial when trying to export my solid meshes (triangles) to vray using the SDK.

These are the errors :-

MeshBuffer.obj : error LNK2019: unresolved external symbol VRay_VRayRenderer_getPluginTypeIdByID referenced in function “protected: __cdecl VRay::Plugin::Plugin(class VRay::VRayRenderer &,unsigned __int64)” (??0Plugin@VRay@@IEAA@AEAVVRayRenderer@1@_K@Z)
2> Hint on symbols that are defined and could potentially match:
2> “unsigned __int64 (__cdecl* VRay::Internal::VRay_VRayRenderer_getPluginTypeIdB yID)(class VRay::Internal::VRayRendererNative *,unsigned __int64)” (?VRay_VRayRenderer_getPluginTypeIdByID@Internal@V Ray@@3P6A_KPEAVVRayRendererNative@12@_K@ZEA)
2>MeshBuffer.obj : error LNK2019: unresolved external symbol VRay_VRayRenderer_newPlugin referenced in function “public: class VRay::Plugin __cdecl VRay::VRayRenderer::newPlugin(char const *,char const *)” (?newPlugin@VRayRenderer@VRay@@QEAA?AVPlugin@2@PEB D0@Z)
2> Hint on symbols that are defined and could potentially match:
2> “int (__cdecl* VRay::Internal::VRay_VRayRenderer_newPlugin)(class VRay::Internal::VRayRendererNative *,char const *,char const *,int,unsigned __int64 *)” (?VRay_VRayRenderer_newPlugin@Internal@VRay@@3P6AH PEAVVRayRendererNative@12@PEBD1HPEA_K@ZEA)
2>MeshBuffer.obj : error LNK2019: unresolved external symbol VRay_VRayRenderer_newPluginByID referenced in function “public: class VRay::Plugin __cdecl VRay::VRayRenderer::newPlugin(char const *,unsigned __int64)” (?newPlugin@VRayRenderer@VRay@@QEAA?AVPlugin@2@PEB D_K@Z)
2> Hint on symbols that are defined and could potentially match:
2> “int (__cdecl* VRay::Internal::VRay_VRayRenderer_newPluginByID)(c lass VRay::Internal::VRayRendererNative *,unsigned __int64,char const *,int,unsigned __int64 *)” (?VRay_VRayRenderer_newPluginByID@Internal@VRay@@3 P6AHPEAVVRayRendererNative@12@_KPEBDHPEA_K@ZEA)
2>MeshBuffer.obj : error LNK2019: unresolved external symbol VRay_VRayRenderer_setPropertyBytesValueAtTimeByID referenced in function “protected: bool __cdecl VRay::Plugin::setArrayAtTimeTemplate<int const *,2000>(char const *,unsigned __int64,int const * const &,double)” (??$setArrayAtTimeTemplate@PEBH$0HNA@@Plugin@VRay@ @IEAA_NPEBD_KAEBQEBHN@Z)
2> Hint on symbols that are defined and could potentially match:
2> "int (__cdecl* VRay::Internal::VRay_VRayRenderer_setPropertyBytes ValueAtTimeByID)(class VRay::Internal::VRayRendererNative *,unsigned __int6

I am linking the VRAY dll using VRAY_RUNTIME_LOAD_PRIMARY

Anton

Hi Anton,

You should use VRAY_RUNTIME_LOAD_PRIMARY only in one compilation unit (cpp-file) where VRayInit resides. In all the other compilation units (the other cpp files) VRAY_RUNTIME_LOAD_SECONDARY should be defined.

Hope that helps,
Stan