This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Downgrading from gcc 3.2.1 to gcc 2.96
- From: puneet girdhar <girdhar_puneet at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 14 Oct 2003 12:04:42 +0100 (BST)
- Subject: Downgrading from gcc 3.2.1 to gcc 2.96
Hi ,
I was using following code on gcc 3.2.1 on Linux.
#include <stdio.h>
#include <dlfcn.h>
int main()
{
char dll_name[100];
void * handle;
//lt_dlhandle hndl;
printf("which lib u want to print :");
scanf("%s",&dll_name);
printf("%s\n",dll_name);
handle = dlopen(dll_name,RTLD_LAZY);
Dl_info info;
void * gotaddr;
gotaddr=dlsym(handle,"_GLOBAL_OFFSET_TABLE_");
dladdr(gotaddr,&info);
printf("value of filename is
%s\n",info.dli_fname);
return 0;
}
This code was working fine with gcc 3.2.1. Now i want
to use this code with gcc 2.96 on linux. But it gives
the following error:
a.cpp: In function `int main ()':
a.cpp:13: `Dl_info' undeclared (first use this
function)
a.cpp:13: (Each undeclared identifier is reported only
once for each
function it appears in.)
a.cpp:13: parse error before `;'
a.cpp:16: `info' undeclared (first use this function)
a.cpp:16: `dladdr' undeclared (first use this
function)
What is way to run this code on gcc 2.96?
Thanks
Puneet
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online.
Go to http://yahoo.shaadi.com