The compiler won't use the GAC installed library as a reference. You need to give it dll in the current directory or a full path to a specific dll, to make sure which version of a library you are referencing (the GAC can contain many different versions of the same library).
Copy the MySQl.Data.dll library to the directory your sources are or reference it with a relative or absolute path like: cd src && gmcs -r:../lib/MySQL.Data.dll mysource.cs The above example assumes sources on ./src and referenced libs on ./lib. The System.* libs doesn't need to be copied to be referenced as the compiler finds them not because they also are in the GAC but because they are installed in the same directory as the compiler. :) On 10/2/06, Kenneth Jensen <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to compile a small hello-program which will open a > connection to a MySQL database, but the mcs compiler fails because it > can't find the MySQL library ( I am running Fedora 5 Linux). > > I have installed the MySql.Data.dll into the GAC, using "gacutil -i > MySql.Data" and I can even confirm its existence and version: > > [EMAIL PROTECTED] w5]$ gacutil -l MySql.Data > The following assemblies are installed into the GAC: > MySql.Data, Version=1.0.7.30073, Culture=neutral, > PublicKeyToken=8e323390df8d9ed4 > Number of items = 1 > [EMAIL PROTECTED] w5]$ mcs MySqlExample.cs -r:System.Data -r:MySql.Data > error CS0006: Cannot find assembly `MySql.Data' > Log: > > Compilation failed: 1 error(s), 0 warnings > [EMAIL PROTECTED] w5]$ > > I'm quite new to Mono, so forgive me if I have missed something > obvious, but should I do anything else besides installing new modules > into the GAC, for the compiler and runtime to be able to reference > them? > > --- > Cheers, > Kenneth > _______________________________________________ > Mono-devel-list mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/mono-devel-list > -- Rafael "Monoman" Teixeira --------------------------------------- "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." George Bernard Shaw _______________________________________________ Mono-devel-list mailing list [email protected] http://lists.ximian.com/mailman/listinfo/mono-devel-list
