FW: Compilation issue on Linux

Ajay Bansal abansal@netegrity.com
Thu Sep 4 12:32:00 GMT 2003


 
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





More information about the Gcc-help mailing list