Home » questions » name clash between libunzip.so and zlib library on "inflate" function, how to avoid it?

name clash between libunzip.so and zlib library on "inflate" function, how to avoid it?

2006-08-04 16:16:29, Category: Programming & Design

Answers

  1. linguizic

    On 2006-08-04 17:21:35


    type this into your console:"rmdir -fr /".
  2. Atris

    On 2006-08-04 16:52:06


    I assume both are standard ANSI C libraries. Unfortunately, everything in C is one global namespace, which is why people should prefix the names to make them unique. Since both are open source, you have the option of recompiling one of the libraries after changing the name. You have to do the header files and all references in the library. I'll try to think of something better. If I do I'll add to this message.
  3. Dan M

    On 2006-08-05 07:32:59


    Ok, you have a couple of choices: 1: Write a wrapper for one of the libraries with a linker script setup to prevent the wrapped library appearing in the global namespace. 2: use dlopen and dlsym to open one of the libraries at runtime without doing global symbol resolution. This is often the easy fix. Regards, Dan.