Code Monkey home page Code Monkey logo

proxy-libintl's Introduction

This is a trivial minimal library intended to act as a proxy for a dynamically loaded optional libintl. This dynamically loaded library would be intl.dll (the core DLL of GNU gettext-runtime) on Windows, libintl.dylib on MacOS, and libintl.so on many embedded (?) platforms. It is relevant on Windows, MacOS and some embedded platforms. On Linux you have gettext functionality already in the C library.

If you compile it with -DSTUB_ONLY the ability to dynamically load libintl is not compiled in, and this library always acts as just a dummy.

The STUB_ONLY patch was provided by Geoffrey Wossum, thanks.

proxy-libintl was originally intended to be used when building software that wants to use i18n features of (GNU) gettext, but one wants to be able to decide only at package/installer construction time whether to actually support i18n or not. In the negative case, one wants to avoid having to ship the gettext DLL (intl.dll) at all. With the -DSTUB_ONLY possibility one can also use it when one has no intention to provide even the possibility of localisation in the binaries one builds against this.

When building Windows DLLs with gcc, if you don't use a .def file and don't use __declspec(dllexport) attributes either to declare the list of exported functions, GNU ld will export all global symbols. Usually this is what you want, as it corresponds closely to what happens on ELF-based platforms like Linux.

However, when you build such a DLL, let's call it libfoo, against the static proxy-libintl, this then means that the libintl entry points will also get exported from the libfoo DLL. This is definitely not what you want. It might then lead to other DLLs higher up in the dependency stack to import the libintl functions from the libfoo DLL.

To avoid this, use the --exclude-libs ld flag, i.e. pass -Wl,--exclude-libs=libintl.a in your LDFLAGS when building libfoo. Unfortunately there is no __declspec(nodllexport)...

Both a "plain" 32-bit library and a x86_64 one is provided.

Tor Lillqvist [email protected], July 2008

proxy-libintl's People

Contributors

nirbheek avatar amezin avatar fasterthanlime avatar bgilbert avatar oleavr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.