Re: gcc vs g++ for dlopen

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

 



The difference is the order you put -ldl on the link lines for gcc and 
g++. 

Try 
	gcc test_library.c -o test_library1 -ldl

I suspect that's you'r problem.  If that doesn't work, then you'll need
to start to construct a demonstration case with the simplest code that
demonstrates the problem.

		--Dean

On Wed, 26 Nov 2008, Kolesar wrote:
> 
> when compiled this test program with:
> gcc -c test_library.c -o test_library1.o
> g++ test_library1.o -o test_library1 -ldl
>
> #>test_library1 -dlopen ./libasim.so
> OK dlopen(./libasim.so)=0x804b020
> 
> but, when i build with:
> gcc -ldl test_library.c -o test_library
> 
> #>test_library -dlopen ./libasim.so
> Segmentation fault
> 
> 
> I need gcc (second) option.
> 
> help me, please.
> 
> BR
> 
> 

-- 
Av8 Internet   Prepared to pay a premium for better service?
www.av8.net         faster, more reliable, better service
617 344 9000   



[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