mirror of https://github.com/mono/CppSharp.git
5 changed files with 63 additions and 15 deletions
@ -1,10 +1,11 @@
@@ -1,10 +1,11 @@
|
||||
using System; |
||||
using CppCsBind; |
||||
|
||||
public class HelloExample |
||||
{ |
||||
public static void Main (String[] args) { |
||||
var h = new Hello.Hello (); |
||||
h.PrintHello (); |
||||
var h = new Hello(); |
||||
h.PrintHello ("Hello world"); |
||||
} |
||||
} |
||||
|
||||
|
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
@..\..\build\premake4.exe vs2010 |
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
common_flags = { } -- Otherwise /clr won't be enabled - bug ? |
||||
|
||||
solution "Hello" |
||||
platforms { "x32" } |
||||
configurations { "Debug", "Release" } |
||||
|
||||
objdir ( "./obj/" ) |
||||
targetdir ("./bin/") |
||||
debugdir ( "./bin/") |
||||
|
||||
configuration "Debug" |
||||
defines { "DEBUG" } |
||||
|
||||
configuration "Release" |
||||
defines { "NDEBUG" } |
||||
flags { "Optimize" } |
||||
|
||||
project "Hello" |
||||
kind "SharedLib" |
||||
language "C++" |
||||
location "." |
||||
platforms { "x32" } |
||||
|
||||
flags { common_flags, "Managed" } |
||||
|
||||
configuration "*" |
||||
buildoptions { common_msvc_copts, "/clr" } |
||||
|
||||
files { "**.h", "**.cpp", "./*.lua" } |
||||
|
||||
configuration "hello.h" |
||||
buildrule { |
||||
description = "Compiling $(InputFile)...", |
||||
commands = { |
||||
'..\\..\\bin\\generator.exe -ns=CppCsBind -outdir=CppCsBind -I. hello.h', |
||||
}, |
||||
outputs = { "CppCsBind\\hello.cpp" } |
||||
} |
||||
|
||||
|
||||
project "SayHello" |
||||
kind "ConsoleApp" |
||||
language "C#" |
||||
location "." |
||||
platforms { "x32" } |
||||
|
||||
files { "**.cs", "./*.lua" } |
||||
|
||||
links { "Hello" } |
||||
|
||||
|
Loading…
Reference in new issue