Hello Guest

Author Topic: Xamarin Studio and OS X  (Read 81883 times)

0 Members and 1 Guest are viewing this topic.

ericmbernier

  • Member
  • Posts: 35
  • Sometimes I make games.
    • View Profile
Xamarin Studio and OS X
« on: November 22, 2013, 07:47:09 AM »
Hey everyone!

I've set up a very simple project on my Mac in Xamarin Studio. I've got a solution with both my game project and Otter added to it. I've added the Otter reference to my Game project, and my Program.cs class looks as so:

Code: [Select]
using System;

using Otter;

namespace HellowWorld
{
class MainClass
{
public static void Main (string[] args)
{

// Console.WriteLine ("Hello World!");
Game game = new Game("Game", 640, 480);
game.SetWindow(640, 480);

game.Start();
}
}
}

I hit run and everything gets built/copied to my bin folder, including the necessary SFML dlls. However, each and every time I try to run my game I'm met with the following exception: "A System.DllNotFoundException was thrown: csfml-graphics-2"

Perhaps there is a step I am missing in configuring Otter for Mac development. This is occurring in the Surface.cs class, on the line "target = new RenderTexture((uint)Width, (uint)Height);"

Lastly, this occurs whether I have "Search for new files to load" checked or not. Thanks for your help in advance. If I figure it out before anyone replies I'll be sure to post my solution.

Cheers,

Eric

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Xamarin Studio and OS X
« Reply #1 on: November 22, 2013, 11:18:26 AM »
I know at least one person that got Otter working for Mac.  There are a bunch of files in the libosx folder that you need, and I think what you need to do is is have those .config files present in some way so that they remap the Windows dll files to the libosx ones using some sort of Mono magic... unfortunately I'm not much help as I only use Windows right now.

ericmbernier

  • Member
  • Posts: 35
  • Sometimes I make games.
    • View Profile
Re: Xamarin Studio and OS X
« Reply #2 on: November 22, 2013, 11:57:35 AM »
I think I figured out the entire process. In the near future I'll post a tumblr post or something to these forums detailing my findings, unless someone beats me to it.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Xamarin Studio and OS X
« Reply #3 on: November 22, 2013, 01:42:37 PM »
Yeah, anything that other users could take a look at would be great, or some sort of step by step process I could add to this page: http://otter2d.com/getstarted.html

TTL_Anderson

  • Member
  • Posts: 2
    • View Profile
Re: Xamarin Studio and OS X
« Reply #4 on: March 03, 2014, 09:21:57 PM »
Any progress on a tutorial for setting up Otter for mac? I'm pretty noobish at getting stuff like this set up, so I'd really appreciate a guide of sorts.

TTL_Anderson

  • Member
  • Posts: 2
    • View Profile
Re: Xamarin Studio and OS X
« Reply #5 on: March 03, 2014, 09:33:56 PM »
Wait...I think it might've worked just by following the general instructions for setting it up with monodevelop? I will go through the first tutorial with this project and let you know how it goes.

ericmbernier

  • Member
  • Posts: 35
  • Sometimes I make games.
    • View Profile
Re: Xamarin Studio and OS X
« Reply #6 on: April 13, 2014, 12:09:46 PM »
So I tried setting up OS X with the new proj file on BitBucket, and the associated lib files. Still no luck :(

Has anyone gotten an OS X environment setup successfully? I'm still getting a System.DllNotFoundException error around this statement, in the Game.cs constructor:

Code: [Select]
#if Unix
    XInitThreads();
#endif

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Xamarin Studio and OS X
« Reply #7 on: April 13, 2014, 05:14:04 PM »
Apparently XInitThreads() is a Linux thing, which shouldn't be happening in OS X.  Here's an updated project file from Ventero, maybe this will help?
https://gist.github.com/Ventero/daddf23b2ed9fa65d2f7

ericmbernier

  • Member
  • Posts: 35
  • Sometimes I make games.
    • View Profile
Re: Xamarin Studio and OS X
« Reply #8 on: April 13, 2014, 06:28:22 PM »
Well it helped a little bit haha. I commented out that line, and it got past that issue, obviously. Once I did that, I realized I hadn't copied the dylib files to /usr/local/lib. So, I went ahead, did that, and:



paste0x78

  • Member
  • Posts: 9
    • View Profile
Re: Xamarin Studio and OS X
« Reply #9 on: June 15, 2014, 07:02:31 PM »
Thanks for the info guys. For anyone else trying to get this working on OSX, this post helped me get it up and running as well. http://en.sfml-dev.org/forums/index.php?topic=14456.msg101673#msg101673
My *.dll.config files weren't copying over and I hadn't noticed.

poole.shane

  • Member
  • Posts: 12
    • View Profile
Re: Xamarin Studio and OS X
« Reply #10 on: September 09, 2014, 09:28:14 PM »
Hey guys. I'm trying to get Otter up and running on my Mac as well, but for the life of me, I just can't figure things out/get it to work. I'm using Xamarin Studio version 5.3.

I've followed all of the instructions (to the best of my abilities) in this thread, but nothing works. I'm getting the "System.DllNotFoundException: csfml-graphics-2" error.

If possible, could you tell me the steps you guys took to get this working in OSX for Xamarin Studio from the beginning? I'm really noobish about this stuff. I just bought my Mac about 2 weeks ago...
I'll just leave this here: https://twitter.com/S_L_Poole