[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: library search test fails, please help
From: |
Peter Johansson |
Subject: |
Re: library search test fails, please help |
Date: |
Mon, 23 Feb 2009 11:02:05 -0500 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
Hello,
[adding autoconf list again]
Alejandro Marcos Aragón wrote:
Well, I tried to put the namespace as well, but the test failed.
I suppose you mean that you tried
AC_SEARCH_LIBS([cpputils::flip], [cpputils],,[AC_MSG_ERROR(library cpputils not
found)])
which would result in test code:
char cpputils::flip ();
int
main ()
{
return cpputils::flip ();
;
return 0;
}
which is not what we desired. We would like something like (I'm not
certain of your exact signature):
namespace cpputils {
void flip (double);
}
int
main ()
{
using namespace cpputils;
flip (1.0);
;
return 0;
}
You could achieve this by rather calling AC_LINK_IFELSE as below
LIBS="$LIBS -lcpputils"
AC_MSG_CHECKING([for flip in cpputils])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
namespace cpputils {
void flip(double);
}
]],
[using namespace cpputils;
flip(1.0);])
],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([library cpputils not found])
]
)
Hope that helps.
Peter
aa
On Sun, 2009-02-22 at 23:26 -0500, Peter Johansson wrote:
aaragon wrote:
address@hidden:~/Lib/lib$ nm -g libcpputils.so | grep flip | c++filt
00003c20 T cpputils::flip(double)
Isn't the problem that flip(double) is in namespace cpputils?
Peter
--
Peter Johansson
svndigest maintainer, http://dev.thep.lu.se/svndigest
yat maintainer, http://dev.thep.lu.se/yat
- Re: library search test fails, please help, (continued)
- Re: library search test fails, please help, aaragon, 2009/02/22
- Re: library search test fails, please help, Bob Friesenhahn, 2009/02/22
- Re: library search test fails, please help, aaragon, 2009/02/22
- Re: library search test fails, please help, Allan Caffee, 2009/02/22
- Re: library search test fails, please help, Keith Marshall, 2009/02/23
Re: library search test fails, please help, Duane Ellis, 2009/02/22
Re: library search test fails, please help, Peter O'Gorman, 2009/02/22
- Re: library search test fails, please help, aaragon, 2009/02/22
- Re: library search test fails, please help, Peter Johansson, 2009/02/22
- Message not available
- Re: library search test fails, please help,
Peter Johansson <=
- RE: library search test fails, please help, John Calcote, 2009/02/23
- Re: library search test fails, please help, aaragon, 2009/02/23
- Re: library search test fails, please help, aaragon, 2009/02/23
Re: library search test fails, please help, Keith Marshall, 2009/02/23
RE: library search test fails, please help, John Calcote, 2009/02/23
RE: library search test fails, please help, aaragon, 2009/02/23
RE: library search test fails, please help, Bob Friesenhahn, 2009/02/23
RE: library search test fails, please help, John Calcote, 2009/02/23
Re: library search test fails, please help, Ralf Wildenhues, 2009/02/28