Re: gcc vs g++ for dlopen

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

 



Hi Kolesar,

> when compiled this test program with:
> gcc -c test_library.c -o test_library1.o

Okay, looks good.

> g++ test_library1.o -o test_library1 -ldl

Why are you using g++?  Why are you not using gcc?

Do you need g++?  Unless there is more to your example than you are
providing (e.g., it's C++ source, not C source), it seems that g++ should
not be necessary here.

> but, when i build with:
> gcc -ldl test_library.c -o test_library

Why are you specifying -ldl out of order?

What happens when you do:
gcc test_library.c -o test_library -ldl

Does that make a difference?

You used g++ before.  Do you need g++?

g++ test_library.c -o test_library -ldl

Does that make a difference?

HTH,
--Eljay



[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