Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to test a C++ library usability in configure.in?
    primarykey
    data
    text
    <p>I'm working on a C++ project on GNU/Linux and I'm looking for a way to test the existence and usability of IBM Informix's library with the Autotools - namely, editing a <code>configure.in</code>. I don't have experience with Autotools, so basically I'm picking up from the project's <code>configure.in</code> <em>et al.</em> scripts and copying&amp;changing where I feel needs to be changed. IOW, I've been adapting from the existing text in <code>configure.in</code>.</p> <p>So far I've been using successfully the <code>AC_CHECK_LIB</code> in <code>configure.in</code> to test whether a certain library both exists and is usable. But this only seems to work with libraries with <em>functions</em>, not e.g. classes. Namely, this fails when testing Informix's <code>libifc++.so</code> library:</p> <pre><code>AC_CHECK_LIB(ifc++, ITString, INFORMIX_LIB="-L$INFORMIX_LIB_LOCATION/c++ -lifc++ -L$INFORMIX_LIB_LOCATION -L$INFORMIX_LIB_LOCATION/dmi -L$INFORMIX_LIB_LOCATION/esql -lifdmi -lifsql -lifasf -lifgen -lifos -lifgls -lifglx $INFORMIX_LIB_LOCATION/esql/checkapi.o -lm -ldl -lcrypt -lnsl", echo "* WARNING: libifc++.so not found!" INFORMIX_INC="" INFORMIX_LIB="" ) </code></pre> <p>I've also tried using other combinations, like <code>ITString::ITString</code>, etc.</p> <p>I haven't found a "pure" function in Informix's API (i.e., one that isn't contexted in a C++ class). So I'm hoping that either there's a way to use <code>AC_CHECK_LIB</code> in this context, or there's another <code>autoconf</code>/<code>configure.in</code> "command" for this specific use.</p> <p>Thanks in advance for your feedback.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload