Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7615763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:43:23+00:00 2026-05-31T02:43:23+00:00

I install MonoDevelop, GTK# and stuff. I open some Cairo tutorials (following the advice

  • 0

I install MonoDevelop, GTK# and stuff. I open some Cairo tutorials (following the advice given here). I create a new GTK# project in MonoDevelop and add the Cairo library to the references. Using this tutorial, I create an expose event for a DrawingArea in a simple GTK form. Code is the following:

protected void OnDrawingAreaExposed (object obj, Gtk.ExposeEventArgs args)
{
    DrawingArea drawArea = (DrawingArea)obj;
    Cairo.Context ctx = Gdk.CairoHelper.Create(drawArea.GdkWindow);

    PointD p1,p2,p3,p4;

    p1 = new PointD (10,10);
    p2 = new PointD(100,100);

    ctx.MoveTo(p1);
    ctx.LineTo(p2);

    ((IDisposable)ctx).Dispose();
}

Whe running the app, nothing is drawn. Ok, I assume that cairo lib is not installed in system. I download it from GTK+ page, put in to folder, where project executable lies – and BANG! – app crashes (System.DllNotFoundException).
In result of all of the above I have a question – is it possible for one to use Cairo in Mono apps on Winows?

P.S. Will add error window screenshot later, if it’s of any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:43:25+00:00Added an answer on May 31, 2026 at 2:43 am

    You shouldn’t try to copy that compiled cairo libraries into the bin folder. Mono (or MonoDevelop – not sure of this part) is shipped with the libs needed. You just add them via clicking on References folder and then Edit References (similar to that of Visual Studio).

    Problem is in the GTK UI editor of MonoDevelop. There is no option to add a custom widget there, though I believe this to be a common task. If you want to do so, you will have to hack on file, generated by that editor (file, named as your window class, in gtk-gui folder). Say, if you have a CairoCanvas class, which inherits the Gtk.DrawingArea widget class – you just find the line, like this.drawingarea1 = new global::Gtk.DrawingArea() and change it to this.drawingarea1 = new CairoCanvas(), not forgetting to add a using YourProjectName; directive upwards, of course.
    Every time you change something in your GUI, file will be regenerated. So then you go to that file, see that waring that it’s changed, press the “Keep changes” button to preserve your work. Then rebuild your project once more, and that’s it.

    I gladly hope this answer will help some Mono newcomers. And I hope to celebrate the day, when MonoDevelop community (it’s OSS, isn’t it?) will implement that lacking functionality.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had some monodevelop programs with a GTK# user interface running smoothly in ubuntu
I tried to install MonoDevelop on Suse 11.0 Enterprise, using the 1-click install on
I've run the following command in the Ubuntu terminal - sudo apt-get install mono-develop
What install tool can I use to create Virtual Directory on IIS? OpenSource, free
On install I copy some files in 'System32' folder. When uninstalling these files are
On install I want to optionally copy some .ini files from SOURCEDIR to TARGETDIR
I have a hobby project that is written in C# using MonoDevelop. I've been
Using MonoDevelop, MonoDroid on a Mac 4.0.6 I am attempting running the sample project
New install of PostgreSQL and pgAdmin on Ubuntu 11.04 64-bit. On restoring a database
I installed MonoDevelop on Linux and wrote a shell GTK+ application. When I compile

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.