anScript

Building native library

Did you hear about “DLL Hell”?

If not, read this first.

Currently this tutorial shows how to build anScript native library only in Windows, using Visual Studio 2017.

  1. Clone anScript git repository from https://github.com/Antollo/anScript.
  2. Open Dll1 project (rename it as you wish).
  3. Put your code to Dll1.cpp (or renamed file).
  4. All functions must be declared in extern "C" block.

Example:

#include "stdafx.h"
#include "scanAndRun.h"

extern "C"
{
    __declspec(dllexport) int printArgumentsNames(std::vector<variableName> arg, functionsManager* superManager);
}

int printArgumentsNames(std::vector<variableName> arg, functionsManager* superManager)
{
    for (auto a : arg)
    {
        std::cout << a << std::endl;
    }
    return 0;
}