My goal here is to apply create scripts that runs on G-WAN and connects to Azure Storage. So to achieve this, I am first trying out how to link dll to C# script in G-WAN and I encountered this error
Error: test.cs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Package TestGwanLibrary was not found in the pkg-config search path.
Perhaps you should add the directory containing `TestGwanLibrary.pc'
to the PKG_CONFIG_PATH environment variable
No package 'TestGwanLibrary' found
error CS8027: Error running pkg-config. Check the above output.
1|// pragma link TestGwanLibrary
2|using System;
3|using System.Collections.Generic;
4|
5|public class Program
6|{
7| public static int Main (string[] args)
8| {
To run G-WAN, you must fix the error(s) or remove this Servlet
Error(s) in testdll.cs
My C# servlet script is as follows
// pragma link TestGwanLibrary
using System;
using System.Collections.Generic;
public class Program
{
public static int Main (string[] args)
{
Console.WriteLine ("Running test.cs");
TestGwanClass2.PrintToConsole2 ("ptc2 test");
return 200;
}
}
Following instructions in G-WAN FAQ, I have placed GameCloudLibrary.dll in
root/gwan_linux64-bit/libraries/cs/dll
However, i am getting the following error when i run gwan. I have also tried adding a MONO_PATH, which is pointing to
/root/gwan_linux64-bit/libraries/cs/dll
but the error above remains unsolved.
My current setup is as follows
- CentOS7.1804
- G-WAN 7.12.6 64-bit (Feb 8 2016 16:33:28)
- Mono JIT compiler version 3.0.2 (tarball Wed Sep 5 03:46:28 EDT 2018)
Below is the class library, using .NET Standard 2.0 using System;
namespace TestGwanLibrary
{
public class TestGwanClass
{
public static void PrintToConsole (string message)
{
Console.WriteLine ("PrintToConsole : " + message);
}
}
}
public class TestGwanClass2
{
public static void PrintToConsole2 (string message)
{
Console.WriteLine ("PrintToConsole2 : " + message);
}
}
I am not sure how i should proceed with this error. Someone, please advice me on what I am missing!