extern "C" unresolved external symbol

Hello,
I am writing a plugin, which register it self with main program when its starter function is called.

the code snip below is taken from the plugin project. I include main program's required headers in order to use its functions to register new plugin with main. But I get this error for each function I used from main


dx11RenderPlugin.obj : error LNK2019: unresolved external symbol "public: void __thiscall amz::Main::initializePlugin(class amz::Plugin *)



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

#include "amzMain.h"

// Plugin it self
Dx11RenderPlugin* plugin;

extern "C" _AmzExport void dllStartPlugin(void)
{
	plugin = new Dx11RenderPlugin();
	// add it to the main
	Main::getSingleton().initializePlugin(plugin);
}

extern "C" _AmzExport void dllStopPlugin(void)
{
	Main::getSingleton().uninitializePlugin(plugin);
	delete plugin;
}
I had forgotten to add main.lib to the plugin project, pretty nooby
Topic archived. No new replies allowed.