質問

Does anyone have g-wan working with C#/mono on Ubuntu 12.04? (And how did you do it?)

I followed the instructions at http://gwan.com/faq#languages.
I have most other languages working include Java with the Oracle 7 JRE/JDK.

I am running G-WAN 3.3.28 64-bit (Mar 28 2012 11:24:16)

I have a hello.cs script (next to the other hello examples under csp/) containing the example code from the gwan website:

using System;

public class hello
{
    public static int Main(string[] args)
    {
        Gwan.xbufCat(Gwan.getReply(args[0]), "Hello World");
        return 200; // HTTP status (200:'OK')
    }
}

When I start gwan it does not show any indiction that it is loading support for C#.
I see an API /library for java, sqlite3, & tkcabinet, am I missing something here for C#?

I used apt-get install mono-devel to setup mono. The binaries are in /usr/bin.
It's not clear to me which C# compiler g-wan supports/uses - AFAIK there's different mono compilers for each version of C#.

Here's the log file and I don't see any refernce to hello.cs.
I checked file permissions on hello.cs and they are the same as the other scripts.

[Sat Sep 29 17:33:27 2012 GMT] ------------------------------------------
[Sat Sep 29 17:33:27 2012 GMT] G-WAN 3.3.28 64-bit (Mar 28 2012 11:24:16)
[Sat Sep 29 17:33:27 2012 GMT] ------------------------------------------
[Sat Sep 29 17:33:27 2012 GMT] Local Time: Sat, 29 Sep 2012 10:33:27 GMT-7
[Sat Sep 29 17:33:27 2012 GMT] RAM : (989.60 MB free + 0 shared + 207.18 MB buffers) / 3.92 GB total
[Sat Sep 29 17:33:27 2012 GMT] DISK: 105.10 GB free / 114.19 GB total
[Sat Sep 29 17:33:27 2012 GMT] 390 processes running
[Sat Sep 29 17:33:27 2012 GMT] 1 Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz (2 Cores/CPU, 1 threads/Core)
[Sat Sep 29 17:33:27 2012 GMT] Using 2 worker threads
[Sat Sep 29 17:33:27 2012 GMT] 64-bit little-endian (least significant byte first)
[Sat Sep 29 17:33:27 2012 GMT] Ubuntu 12.04.1 LTS \n \l (3.2.0-31-generic) 64-bit
[Sat Sep 29 17:33:27 2012 GMT] Glibc: 2.15 (stable)
[Sat Sep 29 17:33:27 2012 GMT] user: root (uid:0), group: root (uid:0)
[Sat Sep 29 17:33:27 2012 GMT] system  fd_max: 1,024
[Sat Sep 29 17:33:27 2012 GMT] program fd_max: 1,024
[Sat Sep 29 17:33:27 2012 GMT] updated fd_max: 1,000,000
[Sat Sep 29 17:33:27 2012 GMT] Available network interfaces (2):
[Sat Sep 29 17:33:27 2012 GMT] 127.0.0.1
[Sat Sep 29 17:33:27 2012 GMT] 192.168.0.16
[Sat Sep 29 17:33:27 2012 GMT] memory footprint: 1.39 MB
[Sat Sep 29 17:33:27 2012 GMT] Host /home/shannon/gwan/gwan_linux64-bit/0.0.0.0_8080/#0.0.0.0:
[Sat Sep 29 17:33:27 2012 GMT] loaded loan.c
[Sat Sep 29 17:33:27 2012 GMT] loaded httpdate.c
[Sat Sep 29 17:33:27 2012 GMT] loaded chart.c
[Sat Sep 29 17:33:27 2012 GMT] loaded asm.c
[Sat Sep 29 17:33:27 2012 GMT] loaded served_from.c
[Sat Sep 29 17:33:27 2012 GMT] loaded report.c
[Sat Sep 29 17:33:27 2012 GMT] loaded captcha.c
[Sat Sep 29 17:33:27 2012 GMT] loaded setheaders.c
[Sat Sep 29 17:33:27 2012 GMT] loaded www_csp.c
[Sat Sep 29 17:33:27 2012 GMT] loaded folder/hellox.c
[Sat Sep 29 17:33:27 2012 GMT] loaded folder/argv.c
[Sat Sep 29 17:33:27 2012 GMT] loaded folder/hello.c
[Sat Sep 29 17:33:27 2012 GMT] loaded getheaders.c
[Sat Sep 29 17:33:27 2012 GMT] loaded contact.c
[Sat Sep 29 17:33:27 2012 GMT] loaded charts.c
[Sat Sep 29 17:33:27 2012 GMT] loaded forum.c
[Sat Sep 29 17:33:27 2012 GMT] loaded div_by_zero.c
[Sat Sep 29 17:33:27 2012 GMT] loaded json_bench.c
[Sat Sep 29 17:33:27 2012 GMT] JAVA_HOME: /usr/lib/jvm/java-7-oracle/
[Sat Sep 29 17:33:27 2012 GMT] loaded report.java
[Sat Sep 29 17:33:27 2012 GMT] loaded kv.c
[Sat Sep 29 17:33:27 2012 GMT] loaded 100.c
[Sat Sep 29 17:33:27 2012 GMT] loaded crash_libc.c
[Sat Sep 29 17:33:27 2012 GMT] loaded crash_gwcall.c
[Sat Sep 29 17:33:27 2012 GMT] loaded email.c
[Sat Sep 29 17:33:27 2012 GMT] loaded hellox.c
[Sat Sep 29 17:33:27 2012 GMT] loaded data_uri.c
[Sat Sep 29 17:33:27 2012 GMT] loaded all.java
[Sat Sep 29 17:33:27 2012 GMT] loaded argv.c
[Sat Sep 29 17:33:27 2012 GMT] loaded hello.mm
[Sat Sep 29 17:33:27 2012 GMT] loaded cookies.c
[Sat Sep 29 17:33:27 2012 GMT] loaded kv_bench.c
[Sat Sep 29 17:33:27 2012 GMT] loaded hello.cpp
[Sat Sep 29 17:33:27 2012 GMT] loaded json.c
[Sat Sep 29 17:33:27 2012 GMT] loaded hello.m
[Sat Sep 29 17:33:27 2012 GMT] loaded hello.c
[Sat Sep 29 17:33:27 2012 GMT] loaded persistence.c
[Sat Sep 29 17:33:27 2012 GMT] loaded sqlite.c
[Sat Sep 29 17:33:27 2012 GMT] loaded servlet_name.c
[Sat Sep 29 17:33:27 2012 GMT] loaded base64.c
[Sat Sep 29 17:33:27 2012 GMT] loaded power.c
[Sat Sep 29 17:33:27 2012 GMT] loaded argv.java
[Sat Sep 29 17:33:27 2012 GMT] loaded comet.c
[Sat Sep 29 17:33:27 2012 GMT] loaded hello.java
[Sat Sep 29 17:33:27 2012 GMT] loaded crash.c
[Sat Sep 29 17:33:27 2012 GMT] loaded cache.c
[Sat Sep 29 17:33:27 2012 GMT] loaded request.c
[Sat Sep 29 17:33:27 2012 GMT] loaded redirect.c
[Sat Sep 29 17:33:27 2012 GMT] loaded fractal.c
[Sat Sep 29 17:33:27 2012 GMT] loaded loan.java
[Sat Sep 29 17:33:27 2012 GMT] loaded trace.c
[Sat Sep 29 17:33:27 2012 GMT] loaded noheaders.c
[Sat Sep 29 17:33:30 2012 GMT] memory footprint: 17.18 MB (with Java VM loaded)
[Sat Sep 29 17:33:30 2012 GMT] java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode
[Sat Sep 29 17:33:30 2012 GMT] server started
役に立ちましたか?

解決

Support for C# / Mono (as well as Scala / JVM) will be available on next release.

If you check the performance charts the version of G-WAN is 3.9 (a beta). They were supposed to release it last week but got delayed since they are doing a demo at "ORACLE Open World" event.

The next version should be released this month.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top