Testing if a library exists

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nodoid
    New Member
    • May 2010
    • 19

    Testing if a library exists

    Hi,

    I'm trying to make an application as cross platform as possible by developing concurrently using Mono (Linux) and .NET (Win32), but I've hit a problem.

    winmm.dll is a Win32 dll which comes with Windows and deals with fun things like mp3 files and certain video files. Okay, it's not the best library going, but does the job. Problem is that it doesn't come with Linux.

    Linux has a multitude of libraries (such as libmad) for playing mp3 files. Some are available under Win32, some aren't.

    What I'd like to do is set a couple of booleans at the start of the application which check if certain libraries are available and then conditionally compile if they exist or don't.

    Problem is this - how do I check if a library is available under both operating systems? If there a standard way of doing this (I'd imagine there is)?

    Thanks

    Paul
Working...