FW: Compilation issue on Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
Ne pointers????

-----Original Message-----
From: Puneet Girdhar [mailto:Puneet_Girdhar@xxxxxxxxxxx] 
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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux