[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

testing for library via C++ class

From: tom fogal
Subject: testing for library via C++ class
Date: Fri, 10 Jun 2005 15:48:12 -0400

I can't seem to find the appropriate way to determine if a user has a
particular library by trying to link with a class and a class method in
that library.

There is a certain static function in a library named 'vtkCommon' that
I would like to check for. I'd like to have autoconf generate a program

#include <vtk/vtkRectilinearGrid.h>
int main() { vtkRectilinearGrid::New(); }

and if it compiled/linked, then assume -lvtkCommon is in a std include
path, add it to LIBS, etc. Unfortunately


is failing because one needs to include the appropriate header or else
compilation fails.

How could I get behavior similar to AC_CHECK_LIB but with an additional
include / other specified line? Maybe I'm making the wrong assumption
that this should be 'easy', and I must AC_DEFINE my own macro to be
testing this sort of thing...

Thanks for any help/insights,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]