DLL/Library question

What are the steps to build a plugin and use it internally in hosting code.

For example using the jucePluginDemo/ JuceDemoPlugin.lib

In host code.

#include "PluginProcessor.h"

AudioProcessor *createPlugin()
{
   AudioProcesor *p = new JuceDemoPluginAudioProcessor;
   return p;
}

How do I add this capability in Introjucer so I can use it on OSX and Windows?