I'm trying to compile for different cases. In some cases I have a desired library installed, in others I don't. I want the same piece of code to manage both. So if I have:
#include <dataacq.h>
and this file exists, everything is fine. If it does not exist, I get a [pre]compiler error, ofcourse, because it tries to load a file that doesn't exist. Is there any way I can get it to load if it exists and not if it doesn't? Can I do anything like:
#if #fexists(dataacq.h)
#include <dataacq.h>
#define DATAACQ_EXISTS
#endif
Using a user-managed compiler #define is a little hard to manage:
#define _DAQ //remove if no DAQ is present
#ifdef _DAQ
#include <dataacq.h>
#endif
Thoughts? Suggestions? Thank you.
#include <dataacq.h>
and this file exists, everything is fine. If it does not exist, I get a [pre]compiler error, ofcourse, because it tries to load a file that doesn't exist. Is there any way I can get it to load if it exists and not if it doesn't? Can I do anything like:
#if #fexists(dataacq.h)
#include <dataacq.h>
#define DATAACQ_EXISTS
#endif
Using a user-managed compiler #define is a little hard to manage:
#define _DAQ //remove if no DAQ is present
#ifdef _DAQ
#include <dataacq.h>
#endif
Thoughts? Suggestions? Thank you.