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

  • Home
  • SEARCH
  • 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 7770437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:24:37+00:00 2026-06-01T16:24:37+00:00

I am new to using .NET, but I am interested in using MonoTouch/Droid to

  • 0

I am new to using .NET, but I am interested in using MonoTouch/Droid to write mobile applications that could share some core code.

I have many C style API libraries I wish to use, for example libxml2. How do I call these native library methods in Mono? Can I use the same binaries compiled from Windows if I am developing in Windows? Can I use the Windows binaries if I am developing in OS X?

  • 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-06-01T16:24:38+00:00Added an answer on June 1, 2026 at 4:24 pm

    How do I call these native library methods in Mono?

    You use p/invoke (platform invoke) to call native C code from any .NET language. You need to write those declarations (of find someone who did it before you) to use the native libraries. Like @Marcelo commented there are often very good, much easier to use .NET alternatives to most C libraries.

    This will work on MonoTouch too. However you’ll need provide a static library (.a on OSX, like a .lib on Windows) since Apple iOS does not allow linking with user-provided dynamic libraries (.dylib on OSX/iOS and .dll on Windows).

    Can I use the same binaries compiled from Windows if I am developing in Windows?

    Windows produced binaries should run fine with Mono on Windows. You can use Microsoft .NET on Windows too.

    Can I use the Windows binaries if I am developing in OS X?

    If the binaries are .NET compiled code then yes – as long as your p/invoke declrations are portable (e.g. 32 vs 64 bits types).

    If the binaries are native code then no. Remember that Mono is not a Windows emulator. It runs CIL code, inside .EXE or .DLL, but it won’t run native Windows code or provide access to Windows native API (outside Windows).

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

Sidebar

Related Questions

I'm using Blowfish.NET newest version,but there is one problem. responce = new byte[6] {
I'm looking at using ASP.NET for a new SaaS service, but for the love
I am fairly new at using the ASP.NET MVC framework and was hoping that
I'm setting up a new project using CruiseControl.net 1.4. I see from ccnet contributions
At my company we're about to build a new site using ASP.NET MVC. My
I am a beginner in ASP.Net. I am starting a new project using ASP.Net
Using .NET and the Word Interop I am programmatically creating a new Word doc
I am using .NET 3.5 and need to convert the below select new result
I'm attaching a new database programatically using VB.net application. I wrote DB scripts and
I'm gonna start a new project soon, using .Net 3.5 and Winform on an

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.