Creation of a new plugin under Visual Studio¶
The purpose of this article is to explain step-by-step how to create and step up a new DLL project under Visual Studio 2008, so that it can be used as a new Scol plugin.
First of all, the Scol SDK, allowing development for Scol-based applications, must be installed. If not, go into the Scol Subversion to trunk\tools\plugin sdk\release and run setup.exe to install the SDK.
Creation of the project¶
Under Visual Studio 2008, go to File > New > Project (Fichier > Nouveau > Projet). In the assistant window, select Win32 project using Visual C++ > Win32 > Win32 Project (Visual C++ > Win32 > Projet Win32).
Then validate the creation of the project by clicking on OK.
In the advanced properties of the project, tick DLL for the application type and choose Empty Project (Projet vide) to create a new Dynamic Link Library without any source file.
Then validate the creation of the project. We can now go on with the configuration of the project itself.
Configuration of the project¶
The first step is to add the template source file for the development of the plugin. In the project folder, create a new directory called src which will contain all the sources.
Then, go the Subversion repository and copy/paste the file named template.cpp available in trunk\plugins\template\sources into the src folder of the Visual Studio solution.
Finally, all we need to do is add this existing source file in our project by right clicking in the project tree on the folder Source files (Fichiers sources), and choosing Add > Existing file (Ajouter > Elément existant).
Compilation of the project¶
The final part consists in adding the environment variable pointing to Scol SDK include folder. To do that, we just need to go (in the project properties) to Configuration properties > C++ > General (Propriétés de configuration > C++ > Général) and add $(SCOL_SDK) in Other Include folders (Autres répertoires Include).