mirror of
https://github.com/tribufu/sdk-rust
synced 2025-06-16 11:14:17 +00:00
Add Premake and FFI Bindings
This commit is contained in:
24
Examples/CSharp/Hello.cs
Normal file
24
Examples/CSharp/Hello.cs
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright (c) TribuFu. All Rights Reserved
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace CSharp
|
||||
{
|
||||
class Program
|
||||
{
|
||||
#if WINDOWS_PLATFORM
|
||||
const string TribuFu = "TribuFu";
|
||||
#else
|
||||
const string TribuFu = "libTribuFu";
|
||||
#endif
|
||||
|
||||
[DllImport(TribuFu)]
|
||||
public static extern int Hello();
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("TribuFu SDK = " + Hello());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user