This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
FW: Compilation issue on Linux
- From: "Ajay Bansal" <abansal at netegrity dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 4 Sep 2003 18:06:39 +0530
- Subject: FW: Compilation issue on Linux
Ne pointers????
-----Original Message-----
From: Puneet Girdhar [mailto:Puneet_Girdhar@infosys.com]
Sent: Thursday, September 04, 2003 5:53 PM
To: Ajay Bansal
Ajay,
I got error while compiling following code on Linux Advanced Server 2.1 with
gcc 3.2.1
#include <stdio.h>
#include <dlfcn.h>
#include "sample1.h"
int main()
{
char dll_name[100];
void * handle;
printf("which lib u want to print :");
scanf("%s",&dll_name);
printf("%s\n",dll_name);
handle = dlopen(dll_name,RTLD_LAZY);
printf("Handle is %x\n",handle);
if(handle == NULL)
printf("Error: %s\n",dlerror());
else
show_lib_info(handle);
return 0;
}
I compiled the code using following command on Linux.
$ gcc -o sample1exe -L. -lsample1 main_sample1.cpp -ldl
It gave me following error
/tmp/ccuKFwWU.o(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0'
collect2: ld returned 1 exit status
Regds
Puneet