autoconf
[Top][All Lists]
Advanced

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

Checking for a C++ library (newbie)


From: jlm
Subject: Checking for a C++ library (newbie)
Date: 28 Sep 2002 19:09:03 -0400

I'm rather new at using the gnu autotools, so please bear with me.

I've written a C++ library that depends on certain other libraries
before it can be used. I understand that the AC_CHECK_LIB macro is used
to check the existance of a library. I'm checking for libgtkmm (the C++
bindings for Gtk+), and I'm not sure what function I need to check for,
so I decided on Gtk::Button::isA. I have attached the relavant parts of
config.log. My question, how do I change the test program that
AC_CHECK_LIB creates so that it compiles? What am I doing wrong?

Thanks

configure:1659: g++ -o conftest -g -O2   conftest.cc -lgtkmm -rdynamic
-L/usr/lib -L/usr/X11R6/lib -lgtkmm -lgdkmm -lgtk -lgdk -lgmodule -lglib
-ldl -lXext -lX11 -lm -lsigc -lpthread -lGL -lgtk  >&5
configure:1648: syntax error before `::'
configure: In function `int main()':
configure:1652: `Gtk' undeclared (first use this function)
configure:1652: (Each undeclared identifier is reported only once
configure:1652: for each function it appears in.)
configure:1652: parse error before `::'
configure:1662: $? = 1
configure: failed program was:
#line 1640 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char Gtk::Button::isA ();
int
main ()
{
Gtk::Button::isA ();
  ;
  return 0;
}

-- 
MACINTOSH = Machine Always Crashes If Not The Operating System Hangs
"Life would be so much easier if we could just look at the source code."
- Dave Olson
"Conan, what is good in life?" "To crush your enemies, see them driven
before you,
and to hear the lamentations of their women"





reply via email to

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