By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,932 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,932 IT Pros & Developers. It's quick & easy.

Testing if a library exists

P: 19

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)?


Jun 14 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.