# Plugin did not instantiate

**URL:** <https://community.zeek.org/t/plugin-did-not-instantiate/6384>\
**Category:** Zeek\
**Created:** [July 28, 2021, 8:24pm UTC](https://community.zeek.org/t/plugin-did-not-instantiate/6384 "2021-07-28T20:24:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankith\_Kumar\_Hanuman](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@Ankith\_Kumar\_Hanuman](https://community.zeek.org/u/Ankith_Kumar_Hanuman)\
**Post date:** [July 28, 2021, 8:24pm UTC](https://community.zeek.org/t/plugin-did-not-instantiate/6384/1 "2021-07-28T20:24:19Z")

</div>

Hi there,

I’m trying to create a new protocol analyzer as a plugin but stumble to get it running. I run into following exception:

/home/user/plugin/build///lib/plugin-Test.linux-x86\_64.so did not instantiate a plugin

This is my code:

Plugin.cc

#include “zeek/plugin/Plugin.h”  
#include “zeek/analyzer/Component.h”  
#include “Test.h”

namespace zeek::plugin::Test\_Plugin {

class Plugin : public zeek::plugin::Plugin {  
public:  
zeek::plugin::Configuration Configure() override {  
AddComponent(new zeek::analyzer::Component(“Test”, zeek::analyzer::Test::Test\_Analyzer::Instantiate));

zeek::plugin::Configuration config;  
config.name = “Plugin::Test\_Analyzer”;  
config.description = “”;  
config.version.major = 1;  
config.version.minor = 0;  
return config;  
}  
} plugin;  
}

Test.h

#pragma once

#include \<stdio.h\>  
#include \<zeek/analyzer/protocol/tcp/TCP.h\>  
#include \<zeek/analyzer/Analyzer.h\>

typedef unsigned char u\_char;  
typedef unsigned short u\_int16;  
typedef short int16;  
typedef unsigned int u\_int32;  
typedef int int32;

namespace zeek::analyzer { namespace Test {

class Test\_Analyzer : public analyzer::tcp::TCP\_ApplicationAnalyzer {  
public:  
Test\_Analyzer(Connection\* conn);  
virtual ~Test\_Analyzer();  
virtual void Done();  
virtual void Init();  
virtual void DeliverStream(int len, const u\_char\* data, bool orig);

static Analyzer\* Instantiate(Connection\* conn)  
{  
return new Test\_Analyzer(conn);  
}  
protected:

int offset;  
};

} } //end namespaces

I followed the guide on how to develop a plugin and looked up some other analyzer in Github, it compiles without error or warning but when I run zeek -N it runs into this error. I even recompiled Zeek, but that didn’t help.

Thanks!

Dane

PS: Sorry for crossposting in zeek-dev-mailing list. I thought that was the right one…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:47pm UTC](https://community.zeek.org/t/plugin-did-not-instantiate/6384/2 "2022-05-06T15:47:44Z")

</div>

Closed on May 6, 2022, 3:47pm UTC


