tags:

views:

284

answers:

2

I downloaded and installed Mono 2.4.2.3 Framework for the Mac OS. The docs say that the download includes the Cocoa Sharp framework binary. But I don't see it anywhere.

Does anyone know where it is?

+3  A: 

/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/cocoa-sharp/

But you shouldn't really need to know where it is because during compilation all you need is the -pkg:cocoa-sharp option. See this tutorial.

Edit: To reference it from within MonoDevelop just use the ".Net Assembly" tab in the "Edit References" window and navigate to the above path. Also, see this explanation as to why cocoa-sharp doesn't appear in the "Packages" tab.

xanadont
Thanks. I am new to this and I thought cocoa-sharp would appear in the list of available references in MonoDevelop, but it does not.
AngryHacker
+4  A: 

In reference to xanadont's answer, the -pkg gmcs compiler argument uses pkgconfig too, so the linked "explanation" in MonoDevelop's FAQ is not valid for this example.

If Cocoa# isn't showing up in the MonoDevelop references list, it's likely that the Mono libraries are not in the paths that pkg-config searches. This is likely because you have MacPorts (or maybe Fink) installed, which overrides the default pkg-config with its own.

You can check that pkg-config can resolve cocoa-sharp with the following command:

pkg-config --modversion cocoa-sharp

and verify the location of pkg-config with

which pkg-config

It should be in /usr/bin.

If this is indeed the problem, the fix is either to remove MacPorts from your PATH, or add Mono to your environment's PKG_CONFIG_PATH:

export PKG_CONFIG_PATH="/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig:$PKG_CONFIG_PATH"
mhutch
I tried to run pkg-config, but it tells me command not found.
AngryHacker
Do you have X11 installed?
mhutch
I checker further and apparently Mono installs a copy of pkg-config, ao I suggest you try reinstalling Mono.
mhutch