yccheok
September 13th, 2005, 02:19 PM
Hi, I had two object file which each of them have a function called "void sayhello"
The problem is:
I try to create a static library from them
ar rcs libmy_library.a dummy.o smartie.o
When my client try to static link his code with my
g++ test.c -L. -lmy_library
The user had no idea which sayhello will be called. Either from dummy.o or smartie.
How I can resolve this function naming conflict problem? Is there any way to check this conflict during ar rcs time? I.e. they will give you warning or error some sort of that.
Thank you.
The problem is:
I try to create a static library from them
ar rcs libmy_library.a dummy.o smartie.o
When my client try to static link his code with my
g++ test.c -L. -lmy_library
The user had no idea which sayhello will be called. Either from dummy.o or smartie.
How I can resolve this function naming conflict problem? Is there any way to check this conflict during ar rcs time? I.e. they will give you warning or error some sort of that.
Thank you.