Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Example does not compile in latest Xamarin MonoMac #9

Open
JoeStrout opened this Issue · 12 comments

5 participants

@JoeStrout

Trying to compile DrawStringTest, I get this error:

.../sysdrawing-coregraphics/Samples/MonoMac/DrawStringTest/DrawingView.cs(33,33): Error CS1729: The type System.Drawing.Graphics' does not contain a constructor that takes0' arguments (CS1729) (DrawStringTest)

Note that the project initially didn't get even this far, because the "using System.Drawing" line failed since System.Drawing wasn't included in the references. So I added it. But now I wonder whether I added the wrong thing.

So possible the real problem here is that the README.md needs to include instructions on how to use this library, for newbies like me?

@JoeStrout

Or, instead of (or in addition to) updating the README, perhaps the Wiki here on Github could be used to provide some instructions. If there's any way I can help, just let me know...

@kjpou1
Collaborator

Hello Joe

There is a problem with the MonoMac side of things right now. I have actually been using a custom MonoMac.dll that I compile/build myself. There is a circular dependency that I hope we will be able to take care of soon.

To build MonoMac it depends on System.Drawing but to build this project it depends on MonoMac for access to the coregraphics. If you are still interested in this project let me know and I will help you out in building a custom MonoMac.dll. I actually did things a little differently this time.

@pcparklin

Hi @kjpou1,
I am trying using emgu-cv in unity via osx, and was stuck in referencing to System.Drawing.
I found this project, but stuck in MonoMac.dll and System.Drawing dependencies again.
Could you give me some suggestion?

@kjpou1
Collaborator

hello @pcparklin

Yes, I can help you out there. Wow nobody but me in here for a long time and all of a sudden some commits and interest. That is great!!!!!

What needs to be done is to build a custom MonoMac.dll that only includes a couple of classes that it needs to build right now. Basically the same concept as the iOS side of things. Right now MonoMac is compiled with System.Drawing already delivered but we will need to replace those and use the system.drawing-coregraphics project file.

Here is my custom build for MonoMac.

https://gist.github.com/kjpou1/8369502

You will also need the Mono project to compile against for these as well.

So from Git you should have

systemdrawing-coregraphics
maccore
monomac
mono

All the above projects should be in the same directory structure. Make a copy of the Makefile in the monomac/src directory and create a new Makefile, just to make sure and have a backup, with the file that is linked to above.

Once you have those you will need to make MonoMac. Just follow the directions from the Git page.

The projects of the SystemDrawing should now load and use the reference to the custom MonoMac.dll. They should also compile as well. If not let me know. I also did not use XamarinMac for this so make sure you use the OpenSource MonoMac if XamarinStudio asks you.

Once we get a few more things worked out and everything is more or less working for Version 1 we will then include this in the normal MonoMac make and they will be delivered.

If this does not work let me know.

Kenneth

@kjpou1 kjpou1 referenced this issue
Closed

Mac Workaround #10

@pcparklin

Hi @kjpou1,
It works great, thanks a lot.

@kjpou1
Collaborator

No problem @pcparklin.

Let us know how things are working.

@kjpou1
Collaborator
@rjhull

I found the problem - was due to files not being in the right places. No need for you to dig further, but thanks for getting back to me.

@kjpou1
Collaborator

I was just looking at this and could not find a problem. Thank you for letting me know.

@JoeStrout

I'm looking at this again, but I've switched to XamMac now. Is there any way to use this library with that?

@ash23

Joe did you manage to get it working with XamMac? I am in the same spot as you.

@JoeStrout

No, I think I gave up on it. (Or at least, I didn't end up using it — I've been coding up my own solution.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.