[Mono-osx] Using Db4Objects on MonoTouch
Tomasz Muszynski
thom at union.waw.pl
Wed Mar 3 10:13:43 EST 2010
From http://monotouch.net/FAQ
"You can not reuse the 1.0 or 2.0 desktop/server assemblies from Mono or .NET with MonoTouch.
To reuse existing .NET code with MonoTouch, you must recompile your libraries with MonoTouch's compiler and base assemblies."
Isn't better to use SQlite?
Regards,
Tomek
Wiadomość napisana przez Dragon160 w dniu 2010-03-03, o godz. 16:03:
>
> Hi there..
> i'am currently developing a project for the iphone using monotouch.
> Cause of the missing bound of the coredata framework i tried to use the db4o
> non-relational-database.
>
> I added the db4o.dll to my project (linked against the dll) and set up a
> simple code example:
>
> IObjectContainer databaseContext = Db4oFactory.OpenFile
> ("newsreader_monotouch.yap");
>
> databaseContext.Store(new {Name = "DAS ist ein Test"});
>
> databaseContext.Commit();
> databaseContext.Close();
>
> ..okay.. so far so good. now i'am going to compile this (no errors), run
> it.. and i get following huge error message:
>
> System.DllNotFoundException: kernel32.dll
> at (wrapper managed-to-native)
> Sharpen.IO.RandomAccessFile:FlushFileBuffers (intptr)
> at Sharpen.IO.RandomAccessFile.Sync () [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.IO.FileStorage+FileBin.Sync () [0x00000] in <filename
> unknown>:0
> at Db4objects.Db4o.IO.BinDecorator.Sync () [0x00000] in <filename
> unknown>:0
> at Db4objects.Db4o.IO.CachingBin.Sync () [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.IO.BinDecorator.Sync () [0x00000] in <filename
> unknown>:0
> at Db4objects.Db4o.IO.BlockAwareBin.Sync () [0x00000] in <filename
> unknown>:0
> at Db4objects.Db4o.Internal.IoAdaptedObjectContainer.SyncAndClose (IBin
> bin) [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.Internal.IoAdaptedObjectContainer.CloseDatabaseFile ()
> [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.Internal.IoAdaptedObjectContainer.ShutdownDataStorage
> () [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.Internal.ObjectContainerBase.ShutdownObjectContainer ()
> [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.Internal.ObjectContainerBase+_IRunnable_123.Run ()
> [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.Foundation.DynamicVariable.With (System.Object value,
> IRunnable block) [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.Foundation.Environments.RunWith (IEnvironment
> environment, IRunnable runnable) [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.Internal.ObjectContainerBase.WithEnvironment (IRunnable
> runnable) [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.Internal.ObjectContainerBase.Open () [0x00000] in
> <filename unknown>:0
> at Db4objects.Db4o.Internal.IoAdaptedObjectContainer..ctor (IConfiguration
> config, System.String fileName) [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.Internal.ObjectContainerFactory.OpenObjectContainer
> (IEmbeddedConfiguration config, System.String databaseFileName) [0x00000] in
> <filename unknown>:0
> at Db4objects.Db4o.Db4oFactory.OpenFile (IConfiguration config,
> System.String databaseFileName) [0x00000] in <filename unknown>:0
> at Db4objects.Db4o.Db4oFactory.OpenFile (System.String databaseFileName)
> [0x00000] in <filename unknown>:0
> at
> NIB_Newsreader_MonoTouch.NewsletterOverviewTableViewController.ViewDidLoad
> () [0x0007c] in
> /Users/*****/Desktop/Diplomarbeit_Projekte/Newsreader_MonoTouch/NIB_Newsreader_MonoTouch/NewsletterOverviewTableViewController.cs:233
> at (wrapper managed-to-native)
> MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
> at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String
> principalClassName, System.String delegateClassName) [0x00038] in
> /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:26
> at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in
> /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:31
> at NIB_Newsreader_MonoTouch.Application.Main (System.String[] args)
> [0x00000] in
> /Users/*****/Desktop/Diplomarbeit_Projekte/Newsreader_MonoTouch/NIB_Newsreader_MonoTouch/Main.cs:16
>
>
>
> -------
> I tried the same code & dll with a normal mono project and it works well!
>
> does anyone has a clue?
> (I hope its general possible to use db4o with monotouch?!?)
>
> Greets :-)
> Dragon
>
> --
> View this message in context: http://n4.nabble.com/Using-Db4Objects-on-MonoTouch-tp1576680p1576680.html
> Sent from the Mono - OSX mailing list archive at Nabble.com.
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
More information about the Mono-osx
mailing list