[mono-vb] vbnc and external dll

Andy Hume andyhume32 at yahoo.co.uk
Fri Jan 16 11:12:24 EST 2009

Matteo Lanati wrote:
> I'm trying to run vb8 code under Linux originally developed with Visual
> Studio Express 2008. I'm using the most recent Mono 2.0 version
> available in Debian testing repositories and the latest vbnc from SVN
> (122295). The problem is that I have to use Fortran functions made
> available by a dll library. The declaration of the function
Firstly, you might not need to recompile on Linux at all.  .NET creates
platform independent IL code and thus it will run on MSFT's CLR or Mono's. 
Just use the same Assembly(s) on Linux and see how it goes.  Presumably
you've recompiled the native fortran code. :-)

If you do need to make changes, you can do the changes on the source code on
the Windows box and recompile there.  I always aim to have one assembly that
works on any platform (well excepting NETCF).

Matteo Lanati wrote:
> Public Declare Sub ProdottoMMfor Lib "matrixfor.dll" (ByRef N As
> Integer, ByRef M As Integer, ByRef L As Integer, ByRef A As Double,
> ByRef B As Double, ByRef c As Double)
> is ok, but when I insert the code to use ProdottoMMfor function, vbnc
> complains that "You've encountered something in the compiler which is
> not implemented. Please file a bug ... "
> Is there a solution to my problem or a workaround to use functions from
> a shared library? I have the source code of the dll, I can recompile it
> Any suggestion is appreciated.

Rolf, creater of the vbnc compiler will likely be here soon to tell us for
sure. :-)  And then a bug report at bugzilla will be wanted, see

If you want to recompile using vbnc, then a workaround may be to convert the
Declare statement to a standard <DllImport(....)> definition.  There might
be more likelyhood of the compiler accepting that.

View this message in context: http://www.nabble.com/vbnc-and-external-dll-tp21501945p21502762.html
Sent from the Mono - VB mailing list archive at Nabble.com.

More information about the Mono-vb mailing list