mingw-cross-env-list
[Top][All Lists]
Advanced

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

Re: [Mingw-cross-env-list] MXE: How to build a self-sufficient DLL that


From: Nikos Chantziaras
Subject: Re: [Mingw-cross-env-list] MXE: How to build a self-sufficient DLL that statically includes other libraries?
Date: Wed, 25 Mar 2015 15:32:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 25/03/15 11:26, Matthias Geier wrote:
Note: the

   export
PKG_CONFIG_PATH_i686_w64_mingw32_static="mxe_dir/usr/i686-w64-mingw32.static/lib/pkgconfig"

is actually crucial.

I set the environment variables after the static build but before the
shared build.
Is that OK?

Yes, that's fine. The MXE build system sets that up correctly. It's only important for external build.


And always check that the path you set is actually correct.

The $PATH definitely works, since all the right executables (with
$TARGET prefixed) are mentioned in the ./configure output and I can
call them directly from the shell.

Are you adding too much to the path? You must only add "/mxe_dir/usr/bin". *Not* "/mxe_dir/usr/$TARGET/bin". This will break stuff.


How can I check if the pkgconfig stuff works?

If you get different output compared to native pkg-config, it works. For example, on Linux, vorbis is missing "-lm" in --libs.


I'm wondering why I don't get a -L argument when running this:

$ i686-w64-mingw32.static-pkg-config --libs vorbis ogg
-lvorbis -logg -lm

That's normal. It seems the default library path is never printed.


These are the exact commands I'm calling (some line breaks may be messed up):

[...]
cd mxe/

make libsndfile -j8 JOBS=8 MXE_TARGETS=$TARGET

Does that work? If yes, then you could edit the mk and use "--disable-static --enable-shared". Then search for the dll in usr/.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]