This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc vs g++ for dlopen
- From: "John (Eljay) Love-Jensen" <eljay at adobe dot com>
- To: Kolesar <asim dot husanovic at gmail dot com>, GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 26 Nov 2008 08:23:43 -0800
- Subject: Re: gcc vs g++ for dlopen
- Accept-language: en-US
- Acceptlanguage: en-US
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