dladdr and Dl_info
Vincent R.
forumer@smartmobili.com
Thu Jan 14 18:54:00 GMT 2010
Hi,
I am trying to compile llvm on latest cygwin and I get an error about
missing
definitions for Dl_info and dladdr.
const llvm::sys::Path& CIndexer::getClangPath() {
// Did we already compute the path?
if (!ClangPath.empty())
return ClangPath;
// Find the location where this library lives (libCIndex.dylib).
#ifdef LLVM_ON_WIN32
...
#else
// This silly cast below avoids a C++ warning.
Dl_info info;
if (dladdr((void *)(uintptr_t)clang_createTranslationUnit, &info) == 0)
assert(0 && "Call to dladdr() failed");
llvm::sys::Path CIndexPath(info.dli_fname);
// We now have the CIndex directory, locate clang relative to it.
CIndexPath.eraseComponent();
CIndexPath.eraseComponent();
CIndexPath.appendComponent("bin");
CIndexPath.appendComponent("clang");
#endif
// Cache our result.
ClangPath = CIndexPath;
return ClangPath;
}
Could it be possible to provide an implementation ?
Thanks
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list