Page 1 of 1

[mono] How to use .NET functions?

PostPosted: December 9th, 2007, 3:06 am
by LLB@codeplex
Hi,

I've downloaded Phalanger, and tried it on Unix. I had an error using PHP library functions (fgets, substr, explode), but I solved this problem by adding "/reference:PhpNetClassLibrary.dll" on the compilation line.

Now, I'd like to call .NET functions, especially from a .dll file. But, I can get an error with the following source file:

<?php System:::Console:::WriteLine("test"); ?>

Error: Call to undefined function: 'System:::Console:::WriteLine'.

I tried several other ways (using the import syntax, etc.) but I didn't succeed. I've added the "/lang:CLR", but it's not enough. I had the same error with other .NET methods (or with functions from a .dll file).

Any solution?

Thanks.

Laurent.