Is the Nx Cloud up? Visit our Status Page for the current health and performance of the Nx Cloud.

Status Page

Wrong plugin name in log

Answered

Comments

7 comments

  • Permanently deleted user

    Can you please check how NX_PLUGIN_API macro is defined in your plugin?

    0
  • Permanently deleted user

    Here are places containing NX_PLUGIN_API word:

     

    In CMakeLists.txt:

    target_compile_definitions(nx_sdk PRIVATE NX_PLUGIN_API="")

    target_compile_definitions(df_plugin
    PRIVATE NX_PLUGIN_API=${API_EXPORT_MACRO}
    INTERFACE NX_PLUGIN_API=${API_IMPORT_MACRO} #< Needed to link unit tests exe to plugin lib.
    )

     

    In Engine.cpp:

    extern "C" NX_PLUGIN_API nx::sdk::IPlugin* createNxPlugin() {

    return new nx::sdk::analytics::Plugin(
    kPluginManifest,
    [](nx::sdk::analytics::Plugin* plugin)
    {
    return new DFNxEngine(plugin);
    });
    }
    0
  • Permanently deleted user

    Most of the code sniplets are copied from stub_analytics_plugin sample

    0
  • Permanently deleted user

    In addition to previous comments:

     

    if(WIN32)
    set(API_IMPORT_MACRO "__declspec(dllimport)")
    set(API_EXPORT_MACRO "__declspec(dllexport)")
    else()
    set(API_IMPORT_MACRO "")
    set(API_EXPORT_MACRO "__attribute__((visibility(\"default\")))")
    endif()
    0
  • Permanently deleted user

    My OS: Ubuntu

    0
  • Permanently deleted user

    Hi Plain Wu,

    I suggest that you check the following:

     

    1. The file lib_context.cpp from the SDK is compiled as part of your plugin project.

    2. The following function defined in your plugin is actually being called by the Server (e.g. set a breakpoint):

    lib_contrext.cpp: /*extern "C"*/ ILibContext* nxLibContext()

    For details about how lib_context mechanism works, please see the comments in `lib_context.h`.

    0
  • Permanently deleted user

    Great! this works!

     

    I added instance.setName() in LibContext& libContext();

     

    Thank you!

    0

Please sign in to leave a comment.